summaryrefslogtreecommitdiff
path: root/compiler/codeGen/CgMonad.lhs
diff options
context:
space:
mode:
authorIavor S. Diatchki <iavor.diatchki@gmail.com>2011-12-29 19:25:10 -0800
committerIavor S. Diatchki <iavor.diatchki@gmail.com>2011-12-29 19:25:10 -0800
commit4715b87194db20df0812b4596998a10ca0110c27 (patch)
treee3c599b2d5f171a80777f7f47426de0cbb0ff35e /compiler/codeGen/CgMonad.lhs
parent8c3bc838c508600a5abe7ab8975ab630ca4a4faf (diff)
downloadhaskell-4715b87194db20df0812b4596998a10ca0110c27.tar.gz
Add the built-in instances for class NatI.
Note 1: For the moment, we provide instances only for numbers that fit in a Word. The reason is a quite mundane: to generate evidence for arbitrary integers we need to generate integer literals. In the core syntax this is a monadic operation but the function that generates the core for evidence is pure. It would not be hard to monadify it but requires changes to a bunch of other functions so I thought it is better left for a separate change. Note 2: The evidence that we generate for a NatI is just a word. Technically, we should be generate a word with two coercions: one to turn it into a NatS and another to turn that into a NatI. Operationally, these do not do anything, but it would be better to fix this. I didn't do it yet because I need to look up how to make these coercions.
Diffstat (limited to 'compiler/codeGen/CgMonad.lhs')
0 files changed, 0 insertions, 0 deletions