summaryrefslogtreecommitdiff
path: root/testsuite/tests/partial-sigs/should_compile/ExtraConstraints1.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/partial-sigs/should_compile/ExtraConstraints1.hs')
-rw-r--r--testsuite/tests/partial-sigs/should_compile/ExtraConstraints1.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/ExtraConstraints1.hs b/testsuite/tests/partial-sigs/should_compile/ExtraConstraints1.hs
new file mode 100644
index 0000000000..f6c6a915ca
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/ExtraConstraints1.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE PartialTypeSignatures #-}
+module ExtraConstraints1 where
+
+arbitCs1 :: _ => a -> String
+arbitCs1 x = show (succ x) ++ show (x == x)
+
+arbitCs2 :: (Show a, _) => a -> String
+arbitCs2 x = arbitCs1 x
+
+arbitCs3 :: (Show a, Enum a, _) => a -> String
+arbitCs3 x = arbitCs1 x
+
+arbitCs4 :: (Eq a, _) => a -> String
+arbitCs4 x = arbitCs1 x
+
+arbitCs5 :: (Eq a, Enum a, Show a, _) => a -> String
+arbitCs5 x = arbitCs1 x