summaryrefslogtreecommitdiff
path: root/testsuite/tests/linear/should_fail/Linear13.hs
blob: 7d36a33570829e522d52279555525f559785e72b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE LinearTypes #-}
{-# LANGUAGE UnicodeSyntax #-}
module Linear13 where

incorrectLet :: a ⊸ ()
incorrectLet a = let x = a in ()

incorrectLetWithSignature :: (Bool->Bool) %1 -> ()
incorrectLetWithSignature x = let y :: Bool->Bool; y = x in ()

incorrectLazyMatch :: (a,b) ⊸ b
incorrectLazyMatch x = let (a,b) = x in b

incorrectCasePromotion :: (a,b) ⊸ b
incorrectCasePromotion x = case x of (a,b) -> b