Weird porting problem with read
Sun, 5 May 2002 18:09:44 +1000
Background: I'm working on porting GHC to IA64. I have the initial
unregisterised port mostly working, except for a weird problem related
to this innocent bit of code (ghc/compiler/main/CmdLineOpts.hs):
opt_HiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Int
cProjectVersionInt = "503"
cProjectPatchLevel = "0"
ghc-5.03: panic! (the `impossible' happened, GHC version 5.03):
Prelude.read: no parse
Possibly of relevance is that cProjectVersionInt is built using
unpackCStringList#, whereas cProjectPatchLevel was generated statically.
Below I've included an ASCII art depiction of the closure that is passed
to read, after evaluation (i.e. I breakpointed after the parse error).
It looks feasibly correct to me, although I may be missing something.
Does anyone have any hints on where to proceed from here?
CONSTR(GHC.Base_C_con_info(tag=1), 0x504af3d8, 0x504af400)
CONSTR(GHC.Base_C#_con_info(tag=0), 0x35#) |
CONSTR(GHC.Base_C_con_info(tag=1), 0x504affc8, 0x504b0000)
CONSTR(GHC.Base_C#_con_info(tag=0), 0x30#) |
CONSTR(GHC.Base_C_con_info(tag=1), 0x504b09b0, 0x504b09d8)
CONSTR(GHC.Base_C#_con_info(tag=0), 0x33#) |
CONSTR(GHC.Base_C_static_info(tag=1), Config_a_closure, GHC.Base__closure)
CONSTR(GHC.Base_C#_static_info(tag=0), 0x30#) |