Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 41 additions & 12 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,54 @@ jobs:
runs-on: ubuntu-20.04
steps:

- uses: cachix/install-nix-action@v10
- name: setup-haskell
uses: actions/setup-haskell@main
with:
skip_adding_nixpkgs_channel: true
stack-version: 2.3.3
enable-stack: true
stack-no-global: true

- name: setup-binaryen
run: |
curl \
-o /tmp/binaryen.deb \
http://deb.debian.org/debian/pool/main/b/binaryen/binaryen_96-1_amd64.deb
sudo dpkg -i /tmp/binaryen.deb
rm /tmp/binaryen.deb

- name: checkout
uses: actions/checkout@v2

- name: build
run: |
mkdir ~/.stack
printf "nix:\n enable: true\n" > ~/.stack/config.yaml

nix-shell --pure --run "stack test"
stack test

sdist:
name: sdist
runs-on: ubuntu-20.04
steps:

- uses: cachix/install-nix-action@v10
- name: setup-haskell
uses: actions/setup-haskell@main
with:
skip_adding_nixpkgs_channel: true
ghc-version: 8.10.2
cabal-version: 3.2.0.0

- name: setup-binaryen
run: |
curl \
-o /tmp/binaryen.deb \
http://deb.debian.org/debian/pool/main/b/binaryen/binaryen_96-1_amd64.deb
sudo dpkg -i /tmp/binaryen.deb
rm /tmp/binaryen.deb

- name: checkout
uses: actions/checkout@v2

- name: sdist
run: |
nix-shell --pure --run "cabal check && cabal v2-sdist all"
cabal check
cabal v2-sdist all

- name: upload-artifact
uses: actions/upload-artifact@v2
Expand All @@ -52,16 +71,26 @@ jobs:
runs-on: ubuntu-20.04
steps:

- uses: cachix/install-nix-action@v10
- name: setup-haskell
uses: actions/setup-haskell@main
with:
skip_adding_nixpkgs_channel: true
ghc-version: 8.10.2
cabal-version: 3.2.0.0

- name: setup-binaryen
run: |
curl \
-o /tmp/binaryen.deb \
http://deb.debian.org/debian/pool/main/b/binaryen/binaryen_96-1_amd64.deb
sudo dpkg -i /tmp/binaryen.deb
rm /tmp/binaryen.deb

- name: checkout
uses: actions/checkout@v2

- name: haddock
run: |
nix-shell --pure --run "cabal v2-haddock --haddock-for-hackage --haddock-hyperlink-source --haddock-quickjump all"
cabal v2-haddock --haddock-for-hackage --haddock-hyperlink-source --haddock-quickjump all

- name: upload-artifact
uses: actions/upload-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ it's no less than the minimum version listed below.
| Haskell bindings version | Minimum Binaryen version |
|--------------------------|--------------------------|
| 0.0.1.* | version_91 |
|--------------------------|--------------------------|
| 0.0.2.* | version_94 |
| 0.0.3.* | version_96 |


## How to build
Expand Down
4 changes: 2 additions & 2 deletions binaryen.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ cabal-version: 1.12
--
-- see: https://github.com/sol/hpack
--
-- hash: f6057bbdb94c86826246804c0ebc4e4201ba42f10aef683bb852f11dfd961045
-- hash: c6dda58fc71ff980baacba8cebb211dfae6ba9a6099d849dd9f830555bb86cf2

name: binaryen
version: 0.0.2.0
version: 0.0.3.0
synopsis: Haskell bindings to binaryen
description: Haskell bindings to [binaryen](https://github.com/WebAssembly/binaryen). Provides complete bindings to the C API, which can be useful for building WebAssembly toolchains in Haskell.
category: Compiler
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: binaryen
version: 0.0.2.0
version: 0.0.3.0
synopsis: Haskell bindings to binaryen
description: Haskell bindings to [binaryen](https://github.com/WebAssembly/binaryen). Provides complete bindings to the C API, which can be useful for building WebAssembly toolchains in Haskell.
category: Compiler
Expand Down
12 changes: 6 additions & 6 deletions src/Binaryen/Expression.hs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ foreign import ccall unsafe "BinaryenBlockGetNumChildren"
blockGetNumChildren ::
Expression -> IO Index

foreign import ccall unsafe "BinaryenBlockGetChild"
foreign import ccall unsafe "BinaryenBlockGetChildAt"
blockGetChild ::
Expression -> Index -> IO Expression

Expand Down Expand Up @@ -489,7 +489,7 @@ foreign import ccall unsafe "BinaryenSwitchGetNumNames"
switchGetNumNames ::
Expression -> IO Index

foreign import ccall unsafe "BinaryenSwitchGetName"
foreign import ccall unsafe "BinaryenSwitchGetNameAt"
switchGetName ::
Expression -> Index -> IO (Ptr CChar)

Expand All @@ -513,7 +513,7 @@ foreign import ccall unsafe "BinaryenCallGetNumOperands"
callGetNumOperands ::
Expression -> IO Index

foreign import ccall unsafe "BinaryenCallGetOperand"
foreign import ccall unsafe "BinaryenCallGetOperandAt"
callGetOperand ::
Expression -> Index -> IO Expression

Expand All @@ -525,7 +525,7 @@ foreign import ccall unsafe "BinaryenCallIndirectGetNumOperands"
callIndirectGetNumOperands ::
Expression -> IO Index

foreign import ccall unsafe "BinaryenCallIndirectGetOperand"
foreign import ccall unsafe "BinaryenCallIndirectGetOperandAt"
callIndirectGetOperand ::
Expression -> Index -> IO Expression

Expand Down Expand Up @@ -569,7 +569,7 @@ foreign import ccall unsafe "BinaryenHostGetNumOperands"
hostGetNumOperands ::
Expression -> IO Index

foreign import ccall unsafe "BinaryenHostGetOperand"
foreign import ccall unsafe "BinaryenHostGetOperandAt"
hostGetOperand ::
Expression -> Index -> IO Expression

Expand Down Expand Up @@ -905,7 +905,7 @@ foreign import ccall unsafe "BinaryenThrowGetEvent"
throwGetEvent ::
Expression -> IO (Ptr CChar)

foreign import ccall unsafe "BinaryenThrowGetOperand"
foreign import ccall unsafe "BinaryenThrowGetOperandAt"
throwGetOperand ::
Expression -> Index -> IO Expression

Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-16.4
resolver: lts-16.10

nix:
path: [nixpkgs=./nixpkgs.nix]
Expand Down