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).