gchi compiles but gch fails
The following module loads into ghci but gch reports an error
module Temp where {
data Ftype = Numa Integer | Str [Char] ;
instance Show Ftype where
show (Str s) = s; show (Numa n) = show n
}
gch error ====
Undefined symbols:
"_ZCMain_main_closure", referenced from:
_ZCMain_main_closure$non_lazy_ptr in libHSrts.a(Main.o)
"___stginit_ZCMain", referenced from:
___stginit_ZCMain$non_lazy_ptr in libHSrts.a(Main.o)
ld: symbol(s) not found collect2: ld returned 1 exit status
And in gchi any function (ReadFtype) placed at the end of the module gives error: Onlyghci.hs:9:0: parse error on input `readFtype'
This same function placed before the instance command compiles.
Not sure if this is relevant but I am using Mac OS X Version 10.6
Trac metadata
Trac field | Value |
---|---|
Version | 6.12.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |