Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a missing fromJust

  • Loading branch information...
commit 5f23251d1a1d7b225f45e28ea5a1b07af4e65614 1 parent a172653
@sol authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 README.markdown
View
16 README.markdown
@@ -80,18 +80,18 @@ then_0 input = case match input "the result should be \"([^\"]*)\"" of
_ -> Nothing
```
-Constructing the test term from that is simple:
+In theory, constructing the test term from that is easy:
```haskell
+import Data.Maybe
import Control.Applicative
-(<+>) = flip (<*>)
-
-test = then_0 "the result should be \"y\""
- <*> when_2 "I pretty-print it"
- <*> when_1 "I reduce it"
- <*> when_0 "I parse it"
- <*> given_0 "a lambda term \"(λx.x)y\""
+test = fromJust $
+ then_0 "the result should be \"y\""
+ <*> when_2 "I pretty-print it"
+ <*> when_1 "I reduce it"
+ <*> when_0 "I parse it"
+ <*> given_0 "a lambda term \"(λx.x)y\""
```
### What to do if multiple things are given?
Please sign in to comment.
Something went wrong with that request. Please try again.