diff options
| author | Iavor S. Diatchki <iavor.diatchki@gmail.com> | 2011-12-29 19:25:10 -0800 |
|---|---|---|
| committer | Iavor S. Diatchki <iavor.diatchki@gmail.com> | 2011-12-29 19:25:10 -0800 |
| commit | 4715b87194db20df0812b4596998a10ca0110c27 (patch) | |
| tree | e3c599b2d5f171a80777f7f47426de0cbb0ff35e /compiler/codeGen/CgMonad.lhs | |
| parent | 8c3bc838c508600a5abe7ab8975ab630ca4a4faf (diff) | |
| download | haskell-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
