summaryrefslogtreecommitdiff
path: root/testsuite/tests/esc/synonym.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/esc/synonym.hs')
-rw-r--r--testsuite/tests/esc/synonym.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/esc/synonym.hs b/testsuite/tests/esc/synonym.hs
new file mode 100644
index 0000000000..24b035ccc1
--- /dev/null
+++ b/testsuite/tests/esc/synonym.hs
@@ -0,0 +1,10 @@
+{-# TYPE nat = {x | x > 0} #-}
+{-# TYPE notNull = {xs | not (null xs)} #-}
+
+{-# CONTRACT f :: nat -> nat #-}
+f :: Int -> Int
+f x = x
+
+{-# CONTRACT g :: notNull -> any #-}
+g :: [Int] -> Int
+g (x:xs) = x