Re: Dynamic types: GHCI works, GHC doesn't?

2002-06-01 Thread Andre Pang
On Sat, Jun 01, 2002 at 07:56:39PM +0100, Alastair Reid wrote: > Your Typeable instance looks like this: > > > instance Typeable FootnoteData where > >typeOf _ = mkAppTy (mkTyCon "FootnoteData") [typeOf ("Foo" :: String), typeOf >(7 :: Int)] > > This should be written: > > > instance Type

Re: Dynamic types: GHCI works, GHC doesn't?

2002-06-01 Thread Alastair Reid
Andre Pang <[EMAIL PROTECTED]> writes: > Hi all, I'm trying to get a grip on the Dynamic types stuff supplied > with GHC, and I'm not sure if I'm doing something wrong, or whether > I've found a bug. Your Typeable instance looks like this: > instance Typeable FootnoteData where >typeOf _ =

Re: Dynamic types: GHCI works, GHC doesn't?

2002-06-01 Thread Andre Pang
On Sat, Jun 01, 2002 at 11:01:57PM +1000, Andre Pang wrote: > It seems that the fromDynamic and fromDyn functions seem to work > if you load your module into GHCI, but they don't work when you > compile it into a stand-alone executable with GHC. .. unless you compile it with -O2: 23:18(0) .

Dynamic types: GHCI works, GHC doesn't?

2002-06-01 Thread Andre Pang
Hi all, I'm trying to get a grip on the Dynamic types stuff supplied with GHC, and I'm not sure if I'm doing something wrong, or whether I've found a bug. It seems that the fromDynamic and fromDyn functions seem to work if you load your module into GHCI, but they don't work when you compile it i

Re: problems with FFI including h files

2002-06-01 Thread Sven Moritz Hallberg
On Saturday 01. June 2002 12:43, Sven Panne wrote: > Alastair Reid wrote: > > Any time you take two large C programs/libraries and try to merge > > them, you're likely to run into preprocessor (or compiler) related > > errors like those you describe. [...] > > Sad, but very true! And GHC's head

Re: problems with FFI including h files

2002-06-01 Thread Sven Panne
Alastair Reid wrote: > Any time you take two large C programs/libraries and try to merge > them, you're likely to run into preprocessor (or compiler) related > errors like those you describe. [...] Sad, but very true! And GHC's headers are not very nice in this respect: panne@jeanluc:~> g