summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_run/TcRun038_B.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_run/TcRun038_B.hs')
-rw-r--r--testsuite/tests/typecheck/should_run/TcRun038_B.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_run/TcRun038_B.hs b/testsuite/tests/typecheck/should_run/TcRun038_B.hs
new file mode 100644
index 0000000000..994348ba42
--- /dev/null
+++ b/testsuite/tests/typecheck/should_run/TcRun038_B.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE FlexibleContexts #-}
+
+module TcRun038_B where
+
+class Foo a where
+ op :: a -> Int
+
+-- Note the (Foo Int) constraint here; and the fact
+-- that there is no (Foo Int) instance in this module
+-- It's in the importing module!
+
+bar :: Foo Int => Int -> Int
+bar x = op x + 7