[C2hs] help a newbie?

Eric Sessoms nubgames at gmail.com
Tue Feb 20 20:40:47 EST 2007

I'm working on a problem that looks, to my eye, identical to the
example in section 2.10 of the documentation

--- cut here ---
module Test where

typedef struct {
  int dummy;
} fitsfile;

int ffclos(fitsfile *fptr, int *status);

{# pointer *fitsfile as FitsFile newtype #}

{# fun ffclos { `FitsFile', `Int' } -> `Int' #}
--- cut here --

But running c2hs I get an error message that I haven't been able to make use of:

Test.chs:13: (column 17) [ERROR]
  >>> Missing "in" marshaller!
  There is no default marshaller for this combination of Haskell and C type:
  Haskell type: FitsFile
  C type      : (FitsFile)

I'm particularly puzzled because the corresponding "open" function
(much more complex, omitted for brevity) that marshals a **fitsfile
doesn't give me any problems.


Thanks much,


More information about the C2hs mailing list