-
Notifications
You must be signed in to change notification settings - Fork 31
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
Correct signatures for FinalizerPtr
s
#57
Conversation
6a9ce44
to
99fc84d
Compare
@amesgen could you please rebase and add CI job? It's fine to modify - name: Build
run: |
rm -f cabal.project
cat > cabal.project <<EOF
packages: .
if os(wasi)
-- https://github.com/haskellari/splitmix/pull/73
source-repository-package
type: git
location: https://github.com/amesgen/splitmix
tag: ebd790e992a83fe1b16b6182677106295d9afba2
EOF
wasm32-wasi-cabal build all -f+bundled-c-zlib |
@@ -101,7 +101,10 @@ library | |||
build-tools: hsc2hs >= 0.67 && < 0.69 | |||
-- GHC 7 ships hsc2hs-0.67 | |||
|
|||
includes: zlib.h | |||
includes: zlib.h hs-zlib.h | |||
install-includes: hs-zlib.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a comment what's the deal with both includes
and install-includes
? I always forget the difference.
@@ -0,0 +1,8 @@ | |||
#ifndef HS_ZLIB_EXTRAS | |||
#define HS_ZLIB_EXTRAS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is an include guard. Alternatively, this could be replaced with #pragma once
(with very(?) slightly reduced portability).
cbits-extra/hs-zlib.c
Outdated
@@ -0,0 +1,9 @@ | |||
#include "hs-zlib.h" | |||
|
|||
void hsInflateEnd(z_streamp strm) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's mangle names even more, like _hs_zlib_inflateEnd
or something.
Thanks! |
We have the signature
in contrast to
so we have a return type mismatch. This doesn't seem to matter on most platforms, but causes errors for WASM/WASI.
Also adds a CI job for GHC WASM/WASI 9.6 and 9.8.