summaryrefslogtreecommitdiff
path: root/testsuite/tests/linear/should_fail/LinearViewPattern.hs
blob: 55058e426383db6f9dae5796f3ba53121a7e9d83 (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE LinearTypes #-}
{-# LANGUAGE ViewPatterns #-}

module LinearViewPattern where

-- This is probably inessential. We are just protecting against potential
-- incorrect Core being emitted by the desugarer. When we understand linear view
-- pattern better, we will probably want to remove this test.

f :: Bool %1 -> Bool
f (not -> True) = True