On Wed, Jan 21, 2004 at 01:15:53PM -0800, Thomas Hallgren wrote:
Henrik Berg wrote:
... I was able to compile Fudgets when I removed 6.0.1, using only 5.04.3.
Still don't understand why I coudn't get it compile with 6.0.1, though.
fudgets-030806.src.tar.gz compiles with GHC 6.0.1.
Fudgets does not yet compile with GHC 6.2, however, since _casm_ (which very conveniently allowed you to include C code fragments in your Haskell code) is no longer supported. For example, the Fudget library uses the following C preprocessor macro
#define SETI(ctype,p,i,field,v) (_casm_ ``((ctype *)%0)[%1].field=%2;'' ((p)::HT(ctype)) (i) (v) :: IO ())
to store values in arrays of records of various types. Is there a convenient way to do things like this without _casm_?
probably the easiest way is to use the preproccess hsc2hs which comes with ghc. it lets you include C code fragments and takes care of splitting out the c code as appropriate. John -- --------------------------------------------------------------------------- John Meacham - California Institute of Technology, Alum. - john@foo.net ---------------------------------------------------------------------------