| class C a b | a - b
| instance C Int Bool
|
| f :: forall a. C Int a = a - a
| f x = x
|
| GHC rejects the type signature for f, because we can see that 'a'
*must
| be* Bool, so it's a bit misleading to universally quantify it.
|
| Ok, maybe this is a reasonable choice.
| I am trying to understand the role of cmm files in the current GHC
| compiler build process (I am guessing, they have replaced .hc files
| like PrimOps and AutoApply).
Yes, that's exactly right.
| They are compiled by the stage1 compiler. Is ability to compile cmm
| preserved in the compiler
Am Dienstag, 16. August 2005 19:45 schrieb Iavor Diatchki:
Hello,
I am not sure what GHC is doing, it certainly seems to be
inconsistent. In Hugs both the examples work. In case you are
interested, here is how you can get a version that works in
both Hugs and GHC (I just modified your code