summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_compile/LexicalNegation.hs
blob: e3e3491aedd503be3077471383d7cae1ef8d8fcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE LexicalNegation #-}

module LexicalNegation where

x :: Int
x = 42

negx :: Int
negx = f -x  where  f = (- 5)

subx :: Int -> Int
subx = (- x)

assertion1 :: Bool
assertion1 = (- x) -x  ==  -(2*x)