Ticket #2877 (closed bug: worksforme)

Opened 4 years ago

Last modified 4 years ago

crash when printig a list (IO ())

Reported by: guest Owned by:
Priority: normal Milestone:
Component: GHCi Version: 6.10.1
Keywords: Cc: oosync@…
Operating System: Windows Architecture: x86_64 (amd64)
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by simonpj) (diff)

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
}}}}

Change History

Changed 4 years ago by simonpj

  • difficulty set to Unknown
  • description modified (diff)

That's odd. On our x86_64 machine it works fine:

[1 of 1] Compiling T2877            ( T2877.hs, interpreted )
Ok, modules loaded: T2877.
*T2877> test
[1,2,3]
["ich","kack","ab"]
*T2877>

Can others try?

Simon

Changed 4 years ago by igloo

Works for me on x86_64/Linux and x386/Windows, but I don't have x86_64/Windows. (nor was I using ghci from within emacs).

Do you have a .o or .hi file for the module? If so, can you reproduce it after removing them?

Changed 4 years ago by igloo

  • status changed from new to closed
  • resolution set to worksforme
Note: See TracTickets for help on using tickets.