[C2hs] cant figure out how to use c2hs, what am i doing wrong?
Manuel M T Chakravarty
chak at cse.unsw.edu.au
Tue Oct 10 16:34:35 EDT 2006
Anatoly,
> I have a simple fftw wrapper which c2hs builds into a .hs file, but
> when i try to use it i get an error:
>
> $ ghc -v --make -fffi Main.hs
> Glasgow Haskell Compiler, Version 6.4.2, for Haskell 98, compiled by
> GHC version 6.4.2
> Using package config file: /usr/lib/ghc-6.4.2/package.conf
> Hsc static flags: -static
> *** Chasing dependencies:
> Chasing modules from: Main.hs
> *** Deleting temp files
> Deleting:
>
> Fftw.chs:2:0: parse error on input `import'
>
> here is my Fftw.chs:
> module Fftw (fftwNew, fftwDestroy, fftwExecute)
You need to add the keyword "where" after the export list. (This is
really a Haskell error and nothing to do with c2hs).
> import C2HS
[..]
Manuel
More information about the C2hs
mailing list