summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc119.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc119.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc119.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc119.hs b/testsuite/tests/typecheck/should_compile/tc119.hs
new file mode 100644
index 0000000000..e29cb6a72f
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc119.hs
@@ -0,0 +1,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