1 module ShouldFail where
3 data Bar = Bar { flag :: Bool } deriving( Show )
5 data State = State { bar :: Bar, baz :: Float }
7 display :: State -> IO ()
8 display (State{ bar = Bar { flag = f, baz = b }}) = print (f,b)
10 -- Typo! The line above should better be:
11 -- display (State{ bar = Bar { flag = f }, baz = b }) = print (f,b)
13 -- GHC 4.04 (as released) crashed with
14 -- panic! (the `impossible' happened): tcLookupValue: b{-r4n-}
15 -- Bug reported by Sven Panne