converting type-level natural numbers to data-level

Henning Thielemann lemming at henning-thielemann.de
Sat Mar 15 17:26:23 UTC 2014


Am 15.03.2014 18:13, schrieb adam vogt:
> http://www.haskell.org/ghc/docs/7.8.1-rc2/html/users_guide/syntax-extns.html#explicit-namespaces
> is the trick

Great, this works!

Now I run into the next problem: How can I convert a type-level natural 
number into a data-level number? The Trac-Wiki mentions singletons:
   https://ghc.haskell.org/trac/ghc/wiki/TypeNats/Basics
and the base package of GHC-7.6 exports the Sing class:
   http://hackage.haskell.org/package/base-4.6.0.1/docs/GHC-TypeLits.html
but it seems to have gone in GHC-7.8. :-(



More information about the Glasgow-haskell-users mailing list