7c8675126718ac3daf36b20dd1731957f0b49ab7
[ghc-hetmet.git] / ghc / tests / typecheck / should_compile / tc119.hs
1 {-# OPTIONS -fglasgow-exts #-}
2
3 -- !!! Functional dependencies and existentials
4
5 -- Hugs (February 2000) doesn't like it. It says
6 --  Variable "e" in constraint is not locally bound
7
8 module ShouldCompile where
9
10 class Collection c e | c -> e where
11    empty :: c
12    put   :: c -> e -> c
13
14 data SomeCollection e = forall c . Collection c e => MakeSomeCollection c