Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not get default hook work. #223

Open
Magicloud opened this issue Dec 15, 2018 · 2 comments
Open

Could not get default hook work. #223

Magicloud opened this issue Dec 15, 2018 · 2 comments

Comments

@Magicloud
Copy link

Magicloud commented Dec 15, 2018

{#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>
@deech
Copy link
Contributor

deech commented Dec 18, 2018

Could you post your definitions for Context and the t typedef?

@Magicloud
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants