[project @ 2001-08-22 11:45:06 by sewardj]
[ghc-hetmet.git] / ghc / tests / typecheck / should_fail / tcfail083.hs
1 module ShouldFail where
2
3 data Bar = Bar { flag :: Bool } deriving( Show )
4
5 data State = State { bar :: Bar, baz :: Float }
6
7 display :: State -> IO ()
8 display (State{ bar = Bar { flag = f, baz = b }}) = print (f,b)
9
10 -- Typo! The line above should better be:
11 -- display (State{ bar = Bar { flag = f }, baz = b }) = print (f,b)
12
13 -- GHC 4.04 (as released) crashed with
14 --      panic! (the `impossible' happened): tcLookupValue: b{-r4n-}
15 -- Bug reported by Sven Panne
16