From 5f23251d1a1d7b225f45e28ea5a1b07af4e65614 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Sun, 10 Jun 2012 20:30:21 +0200 Subject: [PATCH] Add a missing fromJust --- README.markdown | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.markdown b/README.markdown index f9b7d3b..eafcdae 100644 --- a/README.markdown +++ b/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?