c2hs
c2hs copied to clipboard
Could not get default hook work.
{#default out ``Context' [t *] outContext*#}
I got "Something went wrong."
{#default out ``Context' outContext*#}
I got "The phrase `out' is not allowed here."
$ ~/.stack/snapshots/x86_64-linux-tinfo6/lts-12.22/8.4.4/bin/c2hs --version
C->Haskell Compiler, version 0.28.6 Switcheroo, 25 November 2017
build platform is "x86_64-linux" <1, True, True, 1>
Could you post your definitions for Context
and the t
typedef?
t
is defined in header as typedef struct _cairo cairo_t;
, I have cairo
prefix.
Context
is defined as
{#pointer *t as Context foreign finalizer destroy newtype#}
outContext :: Ptr Context -> IO Context
outContext = fmap Context . newForeignPtr cairo_destroy