[Haskell-cafe] Re: More mystery with existentials and fundeps

Matthew Sackman matthew at wellquite.org
Mon May 14 10:26:41 EDT 2007


On Mon, May 14, 2007 at 12:47:02PM +0100, Matthew Sackman wrote:
> > {-# OPTIONS_GHC -fglasgow-exts #-}
> >
> > class F a b | b -> a where
> >
> > data G :: * -> * where
> >           GC :: (F a b) => a -> G b
> >
> > foo :: (F a b) => G b -> a
> > foo g = case g of
> >           (GC a) -> a

And just to confirm, this is both with ghc 6.6 and with today's HEAD.

Matthew
-- 
Matthew Sackman
http://www.wellquite.org/


More information about the Haskell-Cafe mailing list