
31 Jan
2008
31 Jan
'08
11:49 a.m.
I remember that type-level arithmetic is already implemented somewhere, certainly more than once, but certainly seldom in a nicely packaged form.
erm, here http://www.haskell.org/haskellwiki/Type_arithmetic
Yep, there seem to be a few implementations around (decimal, binary, peano) but Oleg's decimal one is likely to be the most friendly when it comes to compiler errors etc ..
http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-Fixed.html#t...
also here: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/numbers-2007.9.25 ?
I'm probably missing something, but I don't understand how these libraries could help. Thanks, Fons