summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen/should_run/cgrun061.hs
blob: 9e32c654dbfd253da2689ebb4eab06c5521fab98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

module Main where

newtype Test = Test { var :: String }

{-
hugs (Sept 2006) gives
Program error: pattern match failure: instShow_v16_v1443 (Test_Test "a")
Program error: pattern match failure: instShow_v16_v1443 (Test_Test "b")
hugs trac #46
-}

main = do print (var x)
          print (var (y{var="b"}))
    where x = Test { var = "a" }
          y = Test "a"