Re: [Haskell-cafe] Type union

17 Sep
2014
17 Sep
'14
6:33 a.m.
Type unions are also necessary for extensible effects. In fact, they are the foundation of extensible effects. One implementation http://okmij.org/ftp/Haskell/extensible/TList.hs uses only common and uncontroversial extensions (No Typeable). It could be converted to closed type families. The other, more optimal implementation, relies on Typeable, so that injection and projection become constant time, regardless of the size of the union. The Typeable constraint can be dispensed with; see the HList implementation of type-indexed coproducts (TIC), which are essentially open unions.
3899
Age (days ago)
3899
Last active (days ago)
0 comments
1 participants
participants (1)
-
oleg@okmij.org