(hopefully) explained
type Bool = True | False
type Foo = One Bool | Two Bool | Three Bool
type Bar = (Bool, Bool, Bool)
type Baz = Baz
{ a : Bool
, b : Bool
, c : Bool
}
type Thingy = Foo | Bar | Baz
type Whatsit = (Foo, Bar, Baz)
type Widget = Foo | (Bar, Baz)
head : List a -> a
head : List a -> Maybe a
head : NonEmptyList a -> a
divide : Float -> Float -> Float -- ☠️
type Person = Person
{ name : String -- ☠️
, age : Int -- ☠️
, gender : String -- ☠️
, postcode : String -- ☠️☠️☠️
}
type Data = Data
{ loading : Bool
, error : Bool
, stuff : Maybe Stuff
}
divide : Float -> NonZeroFloat -> Float -- ☠️
type Gender = Gender String
makeGender : String -> Maybe Gender
type Person = Person
{ name : String -- ☠️
, gender : Gender
}
type Data e a
= Loading
| Error e
| Success a
Show me a swagger schema and I will show you a type with the wrong cardinality
Valid values
Possible values
* the red is "stuff you shouldn't have to deal with"
Valid values