{"id":16711775,"url":"https://github.com/bburdette/typed-collections","last_synced_at":"2025-03-15T04:13:43.493Z","repository":{"id":57674832,"uuid":"146902340","full_name":"bburdette/typed-collections","owner":"bburdette","description":"simple typed layers over standard elm collections","archived":false,"fork":false,"pushed_at":"2019-07-17T18:27:45.000Z","size":17,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T19:51:14.707Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bburdette.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-31T14:26:18.000Z","updated_at":"2019-07-17T18:27:37.000Z","dependencies_parsed_at":"2022-09-02T15:01:32.592Z","dependency_job_id":null,"html_url":"https://github.com/bburdette/typed-collections","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bburdette%2Ftyped-collections","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bburdette%2Ftyped-collections/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bburdette%2Ftyped-collections/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bburdette%2Ftyped-collections/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bburdette","download_url":"https://codeload.github.com/bburdette/typed-collections/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681077,"owners_count":20330155,"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","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":[],"created_at":"2024-10-12T20:26:28.150Z","updated_at":"2025-03-15T04:13:43.474Z","avatar_url":"https://github.com/bburdette.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typed Containers\n\nSimple layers over the standard Elm containers (Dict and Set), that allow \nmore types of keys than just 'comparable'.  When you create the TDict or \nTSet, you must supply conversion functions to go from your key types to \n'comparable' and back.\n\nThis gives you a little extra type safety, at the cost of a little extra \nhassle.\n\nHerer's an example where you have types that are really just comparables \nunderneath, but you want to keep them segregated for safety:\n\n```elm\n\n-- both types are floats, but we don't want to mix the\n-- values together accidentally.\ntype Kilos =\n    Kilos Float\ntype Pounds =\n    Pounds Float\n\n-- Create a TSet with the empty function, which takes two \n-- conversion functions as arguments.  It can be convenient \n-- to create a canonical empty TSet for a certain type:\nemptyKiloSet = \n  TSet.empty \n    (\\(Kilos n) -\u003e n) \n    Kilos\n\n-- a list of Kilo values.\nkilolist = [Kilo 1.0, Kilo 2.0]\n\n-- Then to do the equivalent of fromList:\nkiloSet = TSet.insertList emptyKiloSet kilolist\n\n-- but you can't put the kilolist into a pounds Set. \nemptyPoundSet = \n  TSet.empty \n    (\\(Pounds n) -\u003e n) \n    Pounds\nTSet.insertList emptyPoundSet kilolist  -- type error!\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbburdette%2Ftyped-collections","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbburdette%2Ftyped-collections","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbburdette%2Ftyped-collections/lists"}