Bug or not-yet-supported?

Manuel M T Chakravarty chak at cse.unsw.edu.au
Sun Mar 16 21:13:26 EDT 2008


Niklas Broberg:
> 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. :-)

It is supposed to work in 6.9.  I am sorry, but type families are not  
an officially supported feature in 6.8.x, and hence, any bug fixes  
that requires invasive changes in the type checker will not be merged  
into the 6.8 branch (and by now the 6.8 and 6.9 code bases diverged  
quite a bit).  This is simply to ensure the stability of the stable  
branch.  Type families will be properly supported in 6.10.

Manuel



More information about the Glasgow-haskell-users mailing list