Skip to content

Commit 93f1939

Browse files
committed
Haskell bindings: explain how to use as dependency
1 parent b0994fa commit 93f1939

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

bindings/haskell/README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
This documentation explains how to install the Keystone Haskell bindings from
2-
source.
3-
1+
# Keystone Haskell bindings
2+
## Building
43
1. Install the core Keystone Assembler as a dependency:
54

65
Follow docs/COMPILE.md in the root directory to compile & install the core.
@@ -25,3 +24,28 @@ To build a sample (after having built and installed the Haskell bindings):
2524
$ cd bindings/haskell
2625
$ ghc --make samples/Sample.hs
2726
```
27+
28+
## Using as a dependency
29+
### In a Cabal project
30+
Add the following to the `cabal.project` file in the project root:
31+
32+
```text
33+
source-repository-package
34+
type: git
35+
location: https://github.com/keystone-engine/keystone
36+
subdir:
37+
bindings/haskell
38+
tag: master
39+
40+
-- if the file didn't already exist, add the following also
41+
packages: .
42+
```
43+
44+
### In a Stack project
45+
Add the following to the `stack.yaml` file in the project root:
46+
47+
```yaml
48+
extra-deps:
49+
- git: https://github.com/keystone-engine/keystone
50+
subdir: bindings/haskell
51+
```

0 commit comments

Comments
 (0)