summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc082.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc082.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc082.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc082.hs b/testsuite/tests/typecheck/should_compile/tc082.hs
new file mode 100644
index 0000000000..8ef70afd01
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc082.hs
@@ -0,0 +1,12 @@
+-- !!! tc082: an instance for functions
+--
+module ShouldSucceed where
+
+class Normal a
+ where
+ normal :: a -> Bool
+
+instance Normal ( a -> b ) where
+ normal _ = True
+
+f x = normal id