#2877: crash when printig a list (IO ())
--------------------+-------------------------------------------------------
Reporter:  guest    |          Owner:                
    Type:  bug      |         Status:  new           
Priority:  normal   |      Component:  GHCi          
 Version:  6.10.1   |       Severity:  normal        
Keywords:           |       Testcase:                
      Os:  Windows  |   Architecture:  x86_64 (amd64)
--------------------+-------------------------------------------------------
 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

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2877>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to