summaryrefslogtreecommitdiff
path: root/testsuite/tests/linear/should_fail/LinearConfusedDollar.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/linear/should_fail/LinearConfusedDollar.hs')
-rw-r--r--testsuite/tests/linear/should_fail/LinearConfusedDollar.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/linear/should_fail/LinearConfusedDollar.hs b/testsuite/tests/linear/should_fail/LinearConfusedDollar.hs
new file mode 100644
index 0000000000..2cd1628eeb
--- /dev/null
+++ b/testsuite/tests/linear/should_fail/LinearConfusedDollar.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE LinearTypes #-}
+module LinearConfusedDollar where
+
+-- When ($) becomes polymorphic in the multiplicity, then, this test case won't
+-- hold anymore. But, as it stands, it produces untyped desugared code, hence
+-- must be rejected.
+
+f :: a #-> a
+f x = x
+
+g :: a #-> a
+g x = f $ x