haskell / c2hs

c2hs is a pre-processor for Haskell FFI bindings to C libraries
http://hackage.haskell.org/package/c2hs
Other
198 stars 50 forks source link

Add InterruptibleFFI support #177

Closed centromere closed 5 years ago

centromere commented 7 years ago

This patch adds InterruptibleFFI support.

rwbarton commented 7 years ago

I'm not sure whether c2hs needs to care about this, but the combination of interruptible with unsafe doesn't make sense. In fact GHC rejects combining interruptible with either safe or unsafe with a parse error; unsafe/safe/interruptible is a three-way choice, defaulting to safe.

rwbarton commented 7 years ago

Ah, I didn't look at everything carefully, just the parser and data structure changes. For clarity it might be better to replace the Bool "is unsafe?" field with a copy of GHC's data Safety = PlaySafe | PlayInterruptible | PlayRisky type. (But I'm not the c2hs maintainer.)

centromere commented 5 years ago

Any chance this could be merged in?

deech commented 5 years ago

This PR was added before I took over maintainership and I haven't had a chance to look over it yet. I'm traveling but will try to get to it the first week of January.

gbaz commented 5 years ago

pinging on this -- could really use it.

deech commented 5 years ago

This is now merged. Thanks for your patience.