Re: [Haskell-cafe] FFI / enums

2011-11-07 Thread Brandon Allbery
On Mon, Nov 7, 2011 at 13:44, Johannes Waldmann <
waldm...@imn.htwk-leipzig.de> wrote:

> Does this work with  "ghc -XForeignFunctionInterface" ?
> http://en.wikibooks.org/wiki/Haskell/FFI#Enumerations
>
> I am getting a syntax error right after "#{".
> But then, the description is for "hsc2hs" (not  ghc).
>

hsc2hs translates metalanguage such as that to the code GHC expects.

-- 
brandon s allbery  allber...@gmail.com
wandering unix systems administrator (available) (412) 475-9364 vm/sms
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] FFI / enums

2011-11-07 Thread Johannes Waldmann
Does this work with  "ghc -XForeignFunctionInterface" ?
http://en.wikibooks.org/wiki/Haskell/FFI#Enumerations

I am getting a syntax error right after "#{".
But then, the description is for "hsc2hs" (not  ghc).

And it mentions macros, while C meanwhile has "real" enums.
Well, at leat one can write  "enum match { foo, bar }".

The FFI Addendum does not mention enums at all.

So - what's the agreeable way to do this? - Thanks, J.W.



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe