fix recursive context passing in TutD REPR
commit332a4b49c053830c2b5ac56736442be9f383e89c
authorAgentM <agentm@themactionfaction.com>
dateMon 3 Nov 2014, 21:22 (12 years ago)
parentb0864f4
TutorialDInterpreter.hs+7−4
@@ -135,8 +135,11 @@ reprLoop context = do
135135 Nothing -> return ()
136136 Just line -> do
137137 addHistory line
138− case fst (interpret context line) of
139− Right rel -> putStrLn $ showRelation rel
140− Left err -> putStrLn $ show err
141− reprLoop context
138+ case interpret context line of
139+ (Right rel, contextup) -> do
140+ putStrLn $ showRelation rel
141+ reprLoop contextup
142+ (Left err, _) -> do
143+ putStrLn $ show err
144+ reprLoop context
142145