Testsuite: tabs -> spaces [skip ci]
[ghc.git] / testsuite / tests / patsyn / should_fail / records-mixing-fields.hs
1 {-# LANGUAGE PatternSynonyms #-}
2
3 data MyRec = MyRec { foo :: Int, qux :: String }
4
5 pattern HisRec{f1, f2} = MyRec{foo = f1, qux=f2}
6
7 updater,updater1, updater2 :: MyRec -> MyRec
8 updater a = a {f1 = 1 }
9
10 updater1 a = a {f1 = 1, qux = "two" }
11
12 updater2 a = a {f1 = 1, foo = 2 }