id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
3857	gchi compiles but gch fails	dstr		"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
"	bug	closed	normal		Compiler	6.12.1	invalid			MacOS X	x86	GHC rejects valid program					
