lue-bird / elm-allowable-state / Possibly

In short:


type Possibly
    = Possible

Marks a state as possible to occur.

in results

fromMaybe : Maybe value -> Empty Possibly value

fromList : List element -> Empty Possibly (StackFilled element)

in type declarations

type alias Model =
    WithoutConstructorFunction
        { selected : Empty Possibly Choice
        , planets : Empty Possibly (StackFilled Planet)
        , searchKeyWords : Empty Never (StackFilled String)
        }

type alias WithoutConstructorFunction record =
    record

where WithoutConstructorFunction stops the compiler from creating a positional constructor function for Model.

Read more about the general idea in the module documentation. or readme.