summaryrefslogtreecommitdiff
path: root/testsuite/tests/linear/should_fail/LinearConfusedDollar.hs
blob: a679a504315cea2cb3718e392c3fbef15d43474f (plain)
1
2
3
4
5
6
7
8
9
10
11
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 %1 -> a
f x = x

g :: a %1 -> a
g x = f $ x