on master help sign in
use let instead of unnecessary case complication
commit5dbb1810ce6fff7299b6c3c02ee43fc5ee5f35e7 authorAgentM <agentm@themactionfaction.com> dateMon 3 Nov 2014, 21:31 (12 years ago) parent550b966
1 file changed+4−3
TutorialDInterpreter.hs+4−3
TutorialDInterpreter.hs+4−3
@@ -133,11 +133,12 @@ reprLoop context = do
133133 Nothing -> return ()
134134 Just line -> do
135135 addHistory line
136− case interpret context line of
137− (Right rel, contextup) -> do
136+ let (value, contextup) = interpret context line
137+ case value of
138+ (Right rel) -> do
138139 putStrLn $ showRelation rel
139140 reprLoop contextup
140− (Left err, _) -> do
141+ (Left err) -> do
141142 putStrLn $ show err
142143 reprLoop context
143144