Any versions of Fudgets working with GHC-6?
Hi! I've been trying for a while now to install the Fudget GUI library (http://www.cs.chalmers.se/ComputingScience/Research/Functional/Fudgets/), but with no luck so far. I've tried many different versions, both source and binary, but it seems like there's some kind of dependency or something that I don't know of, the sources won't compile and the binaries won't run... My system is linux (RedHat 7.1), ghc version 6.0.1. Does anyone know how/where I can get a working version of Fudgets, without too many version problems/dependency problems etc etc? -- Henrik
Henrik Berg <henrikbe@ifi.uio.no> writes:
Hi!
I've been trying for a while now to install the Fudget GUI library (http://www.cs.chalmers.se/ComputingScience/Research/Functional/Fudgets/), but with no luck so far. I've tried many different versions, both source and binary, but it seems like there's some kind of dependency or something that I don't know of, the sources won't compile and the binaries won't run...
My system is linux (RedHat 7.1), ghc version 6.0.1. Does anyone know how/where I can get a working version of Fudgets, without too many version problems/dependency problems etc etc?
YESSSS! Suddenly, it worked...!! Seems like I had two GHC-versions on my system at once (6.0.1 and 5.04.3). 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. But, who cares, I got it working at last! Sorry for bothering you all, -- Henrik
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_? -- Thomas H
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. [...] Is there a convenient way to do things like this without _casm_?
Depending on how many casms you have, you could do it with plain old ffi code as demonstrated throughout the Prelude and standard library code used by GHC and Hugs. I'd use this if there's just a few casms because you don't need any external tools. If there's a lot of casms, you could use an FFI preprocessor like Greencard. -- Alastair Reid www.haskell-consulting.com
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 ---------------------------------------------------------------------------
participants (4)
-
Alastair Reid -
Henrik Berg -
John Meacham -
Thomas Hallgren