Permalink
Browse files

Add a missing fromJust

  • Loading branch information...
1 parent a172653 commit 5f23251d1a1d7b225f45e28ea5a1b07af4e65614 @sol committed Jun 10, 2012
Showing with 8 additions and 8 deletions.
  1. +8 −8 README.markdown
View
@@ -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?

0 comments on commit 5f23251

Please sign in to comment.