{"id":15285961,"url":"https://github.com/lue-bird/elm-emptiness-typed","last_synced_at":"2025-10-20T15:38:52.492Z","repository":{"id":42375512,"uuid":"427904788","full_name":"lue-bird/elm-emptiness-typed","owner":"lue-bird","description":"one type for emptiable and safe non-empty","archived":false,"fork":true,"pushed_at":"2023-05-23T23:45:34.000Z","size":3272,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-24T00:48:40.836Z","etag":null,"topics":["elm","focus","non-empty","pivot","scroll","select-list","type-safety","ziplist"],"latest_commit_sha":null,"homepage":"https://package.elm-lang.org/packages/lue-bird/elm-emptiness-typed/latest/","language":"Elm","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"zwilias/elm-holey-zipper","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lue-bird.png","metadata":{"files":{"readme":"README.md","changelog":"changes.md","contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-14T11:03:20.000Z","updated_at":"2023-02-17T16:20:08.000Z","dependencies_parsed_at":"2023-01-30T03:30:39.599Z","dependency_job_id":null,"html_url":"https://github.com/lue-bird/elm-emptiness-typed","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lue-bird%2Felm-emptiness-typed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lue-bird%2Felm-emptiness-typed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lue-bird%2Felm-emptiness-typed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lue-bird%2Felm-emptiness-typed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lue-bird","download_url":"https://codeload.github.com/lue-bird/elm-emptiness-typed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235569499,"owners_count":19011184,"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":["elm","focus","non-empty","pivot","scroll","select-list","type-safety","ziplist"],"created_at":"2024-09-30T15:08:49.096Z","updated_at":"2025-10-07T01:30:24.934Z","avatar_url":"https://github.com/lue-bird.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e one type for emptiable and safe non-empty\n\n# [emptiness typed](https://package.elm-lang.org/packages/lue-bird/elm-emptiness-typed/latest/)\n\n**_🧩 Read about [allowable state](https://package.elm-lang.org/packages/lue-bird/elm-allowable-state/latest/) first_**\n\n## [📦 `Emptiable`](Emptiable) `.....  Never |` [`Possibly`](https://dark.elm.dmy.fr/packages/lue-bird/elm-allowable-state/latest/Possibly)\n\nA `Maybe` value that can be made non-empty depending on what we know – an \"emptiable-able\" value\n\n```elm\nimport Emptiable exposing (Emptiable, filled, fill)\n\ntype alias TextFilled =\n    { first : Char, afterFirst : String }\n\nfirst : Emptiable TextFilled Never -\u003e Char\nfirst =\n    fill \u003e\u003e .first\n\nmaybeFirst :\n    Emptiable TextFilled possiblyOrNever\n    -\u003e Emptiable Char possiblyOrNever\nmaybeFirst =\n    Emptiable.map (filled \u003e\u003e first)\n```\n\n## [📚 `Stack`](Stack)\n\nHandle lists that are\n[`Possibly`](https://dark.elm.dmy.fr/packages/lue-bird/elm-allowable-state/latest/Possibly)\nor `Never` [`Emptiable`](Emptiable#Emptiable)\nin one go\n\n`Emptiable ... Never` allows safe `Maybe`-free\n[`top`](Stack#top), [`removeTop`](Stack#removeTop),\n[`fold`](Stack#fold) (for finding the maximum etc.; some call it \"fold1\"), ...\n\nThat's more useful than you might think.\n\n```elm\nimport Linear exposing (Direction(..))\nimport Emptiable exposing (Emptiable)\nimport Stack exposing (Stacked)\n\nEmptiable.empty\n    --: Emptiable (Stacked element_) Possibly\n    |\u003e Stack.onTopLay 0\n    --: Emptiable (Stacked number_) never_\n    |\u003e Stack.attach Down (Stack.topBelow 1 [ 2, 3 ])\n    --: Emptiable (Stacked number_) never_\n    |\u003e Stack.toTopBelow\n--\u003e ( 1, [ 2, 3, 0 ] )\n```\n\n## where `emptiness-typed` is already being used\n\n- [🗃️ `elm-keysSet`](https://dark.elm.dmy.fr/packages/lue-bird/elm-keysset/latest/)\n- [📜 `elm-scroll`](https://dark.elm.dmy.fr/packages/lue-bird/elm-scroll/latest/)\n- [🚥 `typesafe-array`](https://dark.elm.dmy.fr/packages/lue-bird/elm-typesafe-array/latest/)\n\n## suggestions?\n\n→ See [contributing.md](https://github.com/lue-bird/elm-emptiness-typed/blob/master/contributing.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flue-bird%2Felm-emptiness-typed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flue-bird%2Felm-emptiness-typed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flue-bird%2Felm-emptiness-typed/lists"}