Skip to content

Commit 7df3e19

Browse files
committed
Add explicit Haskell names to the #enum MDB_cursor_op
This is a workaround for haskell/hsc2hs#89, because not having explicit Haskell names prevents cross-compilation via ASM (for now).
1 parent a9b4099 commit 7df3e19

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 0.4.0.1 — 2024-04-05
2+
3+
### Patch
4+
5+
* Add explicit Haskell names to the `#enum MDB_cursor_op`. This is a workaround
6+
for https://github.com/haskell/hsc2hs/pull/89, because not having explicit
7+
Haskell names prevents cross-compilation via ASM (for now).
8+
19
## 0.4.0.0 — 2024-04-04
210

311
### Breaking

cardano-lmdb.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 3.0
22
name: cardano-lmdb
3-
version: 0.4.0.0
3+
version: 0.4.0.1
44
synopsis: Lightning MDB bindings
55
category: Database
66
description:

src/Database/LMDB/FFI.hsc

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ foreign import capi unsafe "lmdb.h value MDB_MULTIPLE" mdbMultiple :: CUInt
158158

159159
newtype MDB_cursor_op = MDB_cursor_op ( #type MDB_cursor_op )
160160
deriving (Show, Eq)
161-
#{enum MDB_cursor_op, MDB_cursor_op, MDB_FIRST, MDB_FIRST_DUP, MDB_GET_BOTH, MDB_GET_BOTH_RANGE, MDB_GET_CURRENT, MDB_GET_MULTIPLE, MDB_LAST, MDB_LAST_DUP, MDB_NEXT, MDB_NEXT_DUP, MDB_NEXT_MULTIPLE, MDB_NEXT_NODUP, MDB_PREV, MDB_PREV_DUP, MDB_PREV_NODUP, MDB_SET, MDB_SET_KEY, MDB_SET_RANGE}
161+
#{enum MDB_cursor_op, MDB_cursor_op, mdbFirst = MDB_FIRST, mdbFirstDup = MDB_FIRST_DUP, mdbGetBoth = MDB_GET_BOTH, mdbGetBothRange = MDB_GET_BOTH_RANGE, mdbGetCurrent = MDB_GET_CURRENT, mdbGetMultiple = MDB_GET_MULTIPLE, mdbLast = MDB_LAST, mdbLastDup = MDB_LAST_DUP, mdbNext = MDB_NEXT, mdbNextDup = MDB_NEXT_DUP, mdbNextMultiple = MDB_NEXT_MULTIPLE, mdbNextNodup = MDB_NEXT_NODUP, mdbPrev = MDB_PREV, mdbPrevDup = MDB_PREV_DUP, mdbPrevNodup = MDB_PREV_NODUP, mdbSet = MDB_SET, mdbSetKey = MDB_SET_KEY, mdbSetRange = MDB_SET_RANGE}
162162

163163
instance Bounded MDB_cursor_op where
164164
minBound = mdbFirst

0 commit comments

Comments
 (0)