summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_compile/tc119.hs
blob: e29cb6a72f44f0ce5da447402c4489832974a9e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies,
             ExistentialQuantification #-}

-- !!! Functional dependencies and existentials

-- Hugs (February 2000) doesn't like it. It says
--  Variable "e" in constraint is not locally bound

module ShouldCompile where

class Collection c e | c -> e where
   empty :: c
   put   :: c -> e -> c

data SomeCollection e = forall c . Collection c e => MakeSomeCollection c