crash when printig a list (IO ())
data InputSignal = IS1 |
IS2
data OutputSignal = OS1 Widget [Int] |
OS2 Widget [String]
type Widget = InputSignal -> OutputSignal
testWidgetSignalProcessor :: (Int, Int, Int) -> Widget
testWidgetSignalProcessor pos@(x, y, z) IS1 = OS1 (testWidgetSignalProcessor pos) [1, 2, 3]
testWidgetSignalProcessor pos@(x, y, z) IS2 = OS2 (testWidgetSignalProcessor (666, 666, 666)) ["ich", "kack", "ab"]
makeTestWidget :: (Int, Int, Int) -> Widget
makeTestWidget pos = testWidgetSignalProcessor pos
display :: OutputSignal -> IO ()
display (OS1 widget list) = print list
display (OS2 widget list) = print list
test :: IO ()
test = do
let testWidget = makeTestWidget (0, 0, 0)
display $ testWidget IS1
display $ testWidget IS2
when i enter "test" at the interpreter-prompt (i'm using ghci from emacs), it crashes with the following message:
: panic! (the 'impossible' happened)
(GHC version 6.10.1 for i386-unknown-mingw32):
loadObj: failed
}