Hi, thanks for a fine bug report. The panic you're running into is something that could be handled more gracefully by the compiler.
Workaround is simple, just add -fvia-C to your GHC command-line. --sigbjorn btw, I'd encourage you to make your Postgres Haskell binding available to other Haskell programmers. Looks like there's plenty of good stuff in there. ----- Original Message ----- From: "Brett Giles" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 09, 2002 12:31 Subject: Compiler 5.02 asked me to report a bug. > Hi, While using green-card to create an interface for postgres database > access, I recieved the following when I executed > > ghc -c PG.hs -o PG.o -fglasgow-exts -i/usr/local/gc-2.03/lib/ghc > -package text -package data -package util > > > ghc-5.02: panic! (the `impossible' happened, GHC version 5.02): > Native code generator can't handle foreign call > {-_ccall-}__casm ``do {PGresult * t;int result; > t = (PGresult *)%0; > do { result = PQnfields( t ); > > %r = (int)(result);} while(0);} while(0);'' > > Please report it as a compiler bug to [EMAIL PROTECTED], > or http://sourceforge.net/projects/ghc/. > > > I am using a newly compiled version of green-card (2.03) on Debian > testing. This is interfacing to postgres version 7.1.3, standard Debian > install. > > The ghc is the standard Debian testing install asl well. > > I have attached the PG.gc ,hs and .hi files, as well as an optional > include file used for hugs... > > Please note, this interface has been working for hugs (albeit with problems) > > Please let me know if there is anything I can do to assist in further > debugging. > > > Brett Giles > Grad Student in formal methods, University of Calgary, > http://www.cpsc.ucalgary.ca/~gilesb > > .. _______________________________________________ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs