
3 Apr
2013
3 Apr
'13
10:38 a.m.
On Wed, Apr 3, 2013 at 9:01 PM, Philippe Sismondi
Can anyone point me in the direction of some explanatory material on the motivation behind empty data declarations?
You could start here: https://github.com/yairchu/red-black-tree/blob/master/RedBlackTree.hs The big picture is defining constants. A declaration like "data Bool = True | False" defines constants at the term-level. Terms are always typed. A declaration like "data Z" defines constants at the type-level. Types are always kinded, typically of kind * (what Z is). The recent introduction of a Constraint kind expands the possibilities of type-level programming. Same for polymorphic kinds. -- Kim-Ee