on master help sign in
use let instead of unnecessary case complication
5dbb181AgentM
TutorialDInterpreter.hs+4−3
@@ -133,11 +133,12 @@ reprLoop context = do
133 Nothing -> return ()
133 Nothing -> return ()
134 Just line -> do
134 Just line -> do
135 addHistory line
135 addHistory line
136− case interpret context line of
136+ let (value, contextup) = interpret context line
137+ case value of
137− (Right rel, contextup) -> do
138+ (Right rel) -> do
138 putStrLn $ showRelation rel
139 putStrLn $ showRelation rel
139 reprLoop contextup
140 reprLoop contextup
140− (Left err, _) -> do
141+ (Left err) -> do
141 putStrLn $ show err
142 putStrLn $ show err
142 reprLoop context
143 reprLoop context
143
144