{"id":16318590,"url":"https://github.com/vic/typeset","last_synced_at":"2025-09-07T18:44:30.505Z","repository":{"id":45303147,"uuid":"441017534","full_name":"vic/typeset","owner":"vic","description":"An Scala type-indexed set, checked at compile time.","archived":false,"fork":false,"pushed_at":"2025-07-15T04:35:58.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-15T10:24:48.480Z","etag":null,"topics":["scala","type-indexed-set","type-level-programming"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"oeiuwq","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2021-12-23T00:21:00.000Z","updated_at":"2025-07-15T04:36:02.000Z","dependencies_parsed_at":"2025-09-07T18:44:29.858Z","dependency_job_id":null,"html_url":"https://github.com/vic/typeset","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vic/typeset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Ftypeset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Ftypeset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Ftypeset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Ftypeset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vic","download_url":"https://codeload.github.com/vic/typeset/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Ftypeset/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274080192,"owners_count":25219015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["scala","type-indexed-set","type-level-programming"],"created_at":"2024-10-10T22:24:02.688Z","updated_at":"2025-09-07T18:44:30.485Z","avatar_url":"https://github.com/vic.png","language":"Scala","funding_links":["https://ko-fi.com/oeiuwq"],"categories":[],"sub_categories":[],"readme":"# typeset [![Main workflow](https://github.com/vic/typeset/actions/workflows/workflow.yml/badge.svg)](https://github.com/vic/typeset/actions)\n\nAn Scala Type indexed set checked at compile time.\n\na TypeSet is similar to ZIO's `Has[_]` type but without any reflection need.\n\n### Adding to your project.\n\nJars are available for all versions and commits at Jitpack.io.\n\n[![](https://jitpack.io/v/vic/typeset.svg)](https://jitpack.io/#vic/typeset)\n\n\n### Usage\n\nCreating a TypeSet is always done by prepending something to `TNil`, which \nrepresent the empty `TypeSet`.\n\n```scala\nimport typeset.*\n\nval x = \"Hello\" :+: TNil\n```\n\nOf course, being a Set, you can't duplicate types of values on it.\n\n```scala\n// val bad = \"Hello\" :+: \"World\" :+: TNil // This wont compile!!\n```\n\nThe type of the set can be re-arrenged on the left side and any combination\ncontaining the same types should be valid.\n\n```scala\nval a: String :+: Boolean :+: Int :+: TNil = \"Hello\" :+: true :+: 42 :+: TNil\nval b: Int :+: String :+: Boolean :+: TNil = a // types are the same.\n```\n\nTypeSets can be joined together if they contained types do not cause duplicates.\n\n```scala\nval a = 1 :+: TNil\nval b = true :+: TNil\nval c = a :+: b // Has type Int :+: Boolean :+: TNil\n```\n\nOnce created, you can obtain the value of a type from a Set.\n\n```scala\nval a = true :+: \"Hello\" :+: TNil\nval x: String = a.get[String] // Returns \"Hello\"\n```\n\nRemoving a type returns it's current value and another collapsed set without the\ntype present.\n\n```scala\nval a = true :+: \"Hello\" :+: TNil\nval (x: String, b) = a.drop[String]() // type of b is Boolean :+: TNil \n```\n\nThat's pretty much it. For more examples you can see the [test code](typeset/test/src).\n\n\n### Contributing\n\nAll contributions are welcome, just please be kind and repectful of other\npeople's time.\n\nFor Building, you will need [mill](https://com-lihaoyi.github.io/mill/mill/Intro_to_Mill.html) installed.\n\n```sh\nmill __.test # This will run all tests\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvic%2Ftypeset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvic%2Ftypeset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvic%2Ftypeset/lists"}