blob: d053b98f60679c3c34b0aac8fcde778b47ba3334 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE NoTraditionalRecordSyntax, NoDoAndIfThenElse, NoMultiWayIf, NoLambdaCase, NoNumericUnderscores, MagicHash #-}
{-# OPTIONS -Werror=missing-space-after-bang #-}
module T16270 where
c = do
if c then
False
else
True
f = id do { 1 }
g = id \x -> x
data Num a => D a
data Pair a b = Pair { fst :: a, snd :: b }
t = p { fst = 1, snd = True }
z :: forall a. ()
z = if True; then (); else ();
data G a where
multiWayIf !i = (a, b)
where
a = if | i -> True
| otherwise -> False
b = if | i -> False
| otherwise -> True
w = \case _ : _ -> True
_ -> False
n = 123_456
s = "hello ωorld"# -- note the omega
lam = \ -> 0
-- a fatal error.
k = let
-- not reported, as the previous one was fatal.
k = let
|