RE: Functional Dependencies

2005-08-17 Thread Simon Peyton-Jones
| 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.

RE: C--

2005-08-17 Thread Simon Peyton-Jones
| 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

Re: Functional Dependencies

2005-08-17 Thread Dirk Reckmann
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