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

improve c2hs support #1906

Open
abbradar opened this issue May 28, 2014 · 4 comments
Open

improve c2hs support #1906

abbradar opened this issue May 28, 2014 · 4 comments
Labels
Cabal: other old-milestone: ⊥ Moved from https://github.com/haskell/cabal/milestone/5 type: enhancement
Milestone

Comments

@abbradar
Copy link

Continuing #55 -- I'm stuck in this bug now (using {#import's in C2HS, which fails without dependency resolution).

@abbradar
Copy link
Author

Gtk2Hs has such dependency resolution: see https://github.com/gtk2hs/gtk2hs/blob/master/gtk/Gtk2HsSetup.hs . This can be reused, I suppose.

@abbradar
Copy link
Author

I've made a minimal "Setup.hs" that implements dependency resolution from C2HS files (code is taken from Gtk2Hs with cleanup). This probably can be integrated into Cabal more easily.
http://bpaste.net/show/311364/

@ttuegel ttuegel added this to the _|_ milestone Apr 24, 2015
bbarenblat added a commit to google/btls that referenced this issue Apr 28, 2018
Let the computer figure out its own types for most foreign imports.
Continue using the vanilla FFI for finalizers, though, as that’s the
easiest way to deal with function pointers.

Reuse the build hook from gtk2hs-buildtools to work around Cabal’s
inability to topologically sort .chs dependencies
(haskell/cabal#1906).
@vmchale
Copy link
Contributor

vmchale commented Jan 22, 2020

@abbradar I wrote chs-cabal which polishes it up a bit - it's kind of hacky on the Cabal side, but it works.

@poscat0x04
Copy link
Contributor

poscat0x04 commented Feb 17, 2020

@vmchale Is it possible to use this package with stack?
Edit: nvm I figured it out that you could use the custom build type

@vmchale vmchale mentioned this issue May 30, 2021
3 tasks
@andreabedini andreabedini added the old-milestone: ⊥ Moved from https://github.com/haskell/cabal/milestone/5 label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cabal: other old-milestone: ⊥ Moved from https://github.com/haskell/cabal/milestone/5 type: enhancement
Projects
None yet
Development

No branches or pull requests

5 participants