Type-Level Programming

The Prim module has sub modules that are not imported by default. Within these modules, Prim defines a few more things for type-level programming. These type classes' instances are derived by the compiler

Type-Level Types, Values, and Proxies

In the below table, "ValueTypeN" was abbreviated to VTN

Value-Level TypeValue-Level Value(s)Kind Name
(Corresponding Type‑Level Type)
Kind Values
OrderingLT GT EQOrderingLT GT EQ
String"literal string"Symbol"literal symbol"
Record
(closest idea)
Record (keyN :: VTN, ...)Row(keyN :: VTN, ...)
Booleantrue/falseBooleanTrue/False
List ( keyN :: VTN, ... )
(analogy; not real type)
Nil

Cons a (ListR a)
RowListNil

Cons :: Symbol -> Type -> RowList

Real-World examples

Ideas