{- You can optionally add types
`x : T` means that `x` has type `T`
-}
let Config : Type =
Config's type is Type?Clear as mud.
{- You can optionally add types
`x : T` means that `x` has type `T`
-}
let Config : Type =
Config's type is Type?Clear as mud.
[EDIT] I mean, you can almost "who's on first?" this.
"OK, what type do you want this to be?"
"Type."
"Yes, what type do you want it to be?"
"Type."
"Great, ok, yes, the type, what type is Config?"
"Type."
"WHAT IS THE NAME OF THE TYPE YOU WANT CONFIG TO BE???"
"Type."
flips desk
let ConfigOf : Type -> Type = \(type : Type) ->
{- What happens if you add another field here? -}
{ home : type
, privateKey : type
, publicKey : type
}
let Config : Type = ConfigOf Text
and the rest of the example still works and evaluates the same.Also in a later example it has the expression `generate 10 Config buildUser`, which also works because of first-class types. Instead of needing generics, you just take a type as a regular parameter.