Skip to content

Commit cb4803b

Browse files
committed
cleanup the README
1 parent 861ec70 commit cb4803b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ using a remote monad.
1313
**javascript-bridge** remotely executes JavaScript *fragments*.
1414
The basic Haskell idiom is.
1515
```Haskell
16-
send eng $ command "console.log('Hello!')"
16+
send eng $ command "console.log('Hello!')"
1717
```
18-
where `send` is an `IO` function that sends a commands for remote exection,
18+
where `send` is an `IO` function that sends a commands for remote execution,
1919
`eng` is a handle into a specific JavaScript engine,
2020
and `command` is a command builder.
2121

@@ -43,7 +43,7 @@ then listening for the event in Haskell.
4343

4444
```Haskell
4545
do -- Have JavaScript send an event to Haskell
46-
send eng $ command $ "event('Hello!')"
46+
send eng $ command $ event ('Hello!'::String)"
4747
-- Have Haskell wait for the event, which is an Aeson 'Value'.
4848
e :: Value <- listen eng
4949
print e
@@ -55,15 +55,15 @@ Bootstrapping the connection is straightforward.
5555
First, use a `middleware` to setup the (Haskell) server.
5656
5757
```Haskell
58-
import qualified Network.JavaScript as JS
58+
import qualified Network.JavaScript
5959
6060
...
6161
scotty 3000 $ do
62-
middleware $ JS.start app
62+
middleware $ start app
6363
...
6464
6565
app :: Engine -> IO ()
66-
app = send eng $ command "console.log('Hello!')"
66+
app eng = send eng $ command "console.log('Hello!')"
6767
```
6868
6969
Next, include the following fragment in your HTML code.

0 commit comments

Comments
 (0)