Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit 4229ae8

Browse files
authored
Work with C API breaking change in upstream version_92 (#8)
1 parent 4bf66f7 commit 4229ae8

File tree

12 files changed

+26
-19
lines changed

12 files changed

+26
-19
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG for `binaryen`
22

3+
## 0.0.1.1
4+
5+
- Fix a runtime error when linking against `version_92` or above due to a
6+
breaking [change](https://github.com/WebAssembly/binaryen/pull/2745) in
7+
upstream C API.
8+
39
## 0.0.1.0
410

511
- Initial release.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ it's no less than the minimum version listed below.
1717

1818
| Haskell bindings version | Minimum Binaryen version |
1919
|--------------------------|--------------------------|
20-
| 0.0.1.0 | version_91 |
20+
| 0.0.1.* | version_91 |
2121

2222

2323
## How to build

binaryen.cabal

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ cabal-version: 1.12
44
--
55
-- see: https://github.com/sol/hpack
66
--
7-
-- hash: 36ff73cba099e841c7dc59136556f413d3416a42487b5fb1d1cec6c31367ef83
7+
-- hash: 251c6e574c5ec09d1d10b696369cf63c067062fe0a5765714a59ed52207d0c15
88

99
name: binaryen
10-
version: 0.0.1.0
10+
version: 0.0.1.1
1111
synopsis: Haskell bindings to binaryen
1212
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.
1313
category: Compiler
14-
homepage: https://github.com/tweag/asterius#readme
15-
bug-reports: https://github.com/tweag/asterius/issues
14+
homepage: https://github.com/tweag/haskell-binaryen#readme
15+
bug-reports: https://github.com/tweag/haskell-binaryen/issues
1616
maintainer: Shao Cheng <cheng.shao@tweag.io>
1717
copyright: (c) 2018 Tweag I/O
1818
license: BSD3
@@ -25,7 +25,7 @@ extra-source-files:
2525

2626
source-repository head
2727
type: git
28-
location: https://github.com/tweag/asterius
28+
location: https://github.com/tweag/haskell-binaryen
2929

3030
library
3131
exposed-modules:

package.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: binaryen
2-
version: 0.0.1.0
2+
version: 0.0.1.1
33
synopsis: Haskell bindings to binaryen
44
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.
55
category: Compiler
66
maintainer: Shao Cheng <cheng.shao@tweag.io>
77
copyright: (c) 2018 Tweag I/O
88
license: BSD3
9-
github: tweag/asterius
9+
github: tweag/haskell-binaryen
1010

1111
extra-source-files:
1212
- CHANGELOG.md

src/Binaryen/Event.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module Binaryen.Event where
1111

1212
import Binaryen.Type
1313
import Foreign (Ptr, Storable)
14-
import Foreign.C (CChar(..), CInt(..))
14+
import Foreign.C (CChar(..), CInt(..), CUIntPtr(..))
1515

1616
newtype Event = Event (Ptr Event)
1717
deriving (Eq, Show, Storable)

src/Binaryen/Expression.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Binaryen.Type
1717
import Data.Int (Int8, Int32, Int64)
1818
import Data.Word (Word32, Word8)
1919
import Foreign (Ptr, Storable)
20-
import Foreign.C (CChar(..), CDouble(..), CFloat(..), CInt(..))
20+
import Foreign.C (CChar(..), CDouble(..), CFloat(..), CInt(..), CUIntPtr(..))
2121

2222
newtype Expression = Expression (Ptr Expression)
2323
deriving (Eq, Show, Storable)

src/Binaryen/Function.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import Binaryen.Index
1414
import {-# SOURCE #-} Binaryen.Module
1515
import Binaryen.Type
1616
import Foreign (Ptr, Storable)
17-
import Foreign.C (CChar(..))
17+
import Foreign.C (CChar(..), CUIntPtr(..))
1818

1919
newtype Function = Function (Ptr Function)
2020
deriving (Eq, Show, Storable)

src/Binaryen/Global.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module Binaryen.Global where
1212
import Binaryen.Type
1313
import Binaryen.Expression
1414
import Foreign (Ptr, Storable)
15-
import Foreign.C (CChar(..), CInt(..))
15+
import Foreign.C (CChar(..), CInt(..), CUIntPtr(..))
1616

1717
newtype Global = Global (Ptr Global)
1818
deriving (Eq, Show, Storable)

src/Binaryen/Module.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Binaryen.Type
2020
import Data.Int (Int8)
2121
import Data.Word (Word8, Word32)
2222
import Foreign (Ptr, Storable)
23-
import Foreign.C (CChar(..), CInt(..), CSize(..))
23+
import Foreign.C (CChar(..), CInt(..), CSize(..), CUIntPtr(..))
2424

2525
newtype Module = Module (Ptr Module)
2626
deriving (Eq, Show, Storable)

src/Binaryen/Type.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ module Binaryen.Type where
1111

1212
import Data.Word (Word32)
1313
import Foreign (Ptr, Storable)
14+
import Foreign.C (CUIntPtr(..))
1415

15-
newtype Type = Type Word32
16+
newtype Type = Type CUIntPtr
1617
deriving (Eq, Show, Storable)
1718

1819
foreign import ccall unsafe "BinaryenTypeNone" none :: Type

0 commit comments

Comments
 (0)