Skip to content

Commit cd64565

Browse files
committed
Add a simple example of local usage
1 parent 3c4c900 commit cd64565

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

Interpreter.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import IServ.Remote.Message
55
import IServ.Remote.Interpreter
66

77
verbose :: Bool
8-
verbose = True
8+
verbose = False
99

1010
main :: IO ()
1111
main = do

local-example.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
GHC="${GHC:-ghc}"
6+
port=5005
7+
8+
cabal build -w "$GHC" iserv-proxy
9+
cabal run -w "$GHC" iserv-proxy-interpreter $port . &
10+
interpreter=$?
11+
12+
proxy="$(cabal list-bin -w "$GHC" exe:iserv-proxy)"
13+
echo "print \"Hello world!\"" | \
14+
"$GHC" \
15+
--interactive \
16+
-fexternal-interpreter \
17+
-pgmi "$proxy" \
18+
-opti 127.0.0.1 -opti$port
19+
20+
kill $interpreter

0 commit comments

Comments
 (0)