Bug or not-yet-supported?

Niklas Broberg niklas.broberg at gmail.com
Sun Mar 16 20:23:37 EDT 2008


I haven't payed much attention to how much of type families is/should
be implemented for 6.8.2. What of equality constraints? The following
parses alright, but can't be used it seems.

------------------------------------
module Foo where

class C a where
 proof :: a

instance (a ~ Int) => C a where
 proof = 1
------------------------------------

%> ghci -fglasgow-exts -XUndecidableInstances Foo.hs
GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
[1 of 1] Compiling Foo              ( Foo.hs, interpreted )
Ok, modules loaded: Foo.
*Foo> proof :: Int
: panic! (the 'impossible' happened)
  (GHC version 6.8.2 for i386-unknown-mingw32):
        nameModule $dC{v aoz}

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

------------------------------------
I would follow that last advice if I knew this was *supposed* to work. :-)

Cheers,

/Niklas


More information about the Glasgow-haskell-users mailing list