on master help sign in
fix recursive context passing in TutD REPR
332a4b4AgentM
TutorialDInterpreter.hs+7−4
@@ -135,8 +135,11 @@ reprLoop context = do
135 Nothing -> return ()
135 Nothing -> return ()
136 Just line -> do
136 Just line -> do
137 addHistory line
137 addHistory line
138− case fst (interpret context line) of
138+ case interpret context line of
139+ (Right rel, contextup) -> do
139− Right rel -> putStrLn $ showRelation rel
140+ putStrLn $ showRelation rel
141+ reprLoop contextup
142+ (Left err, _) -> do
140− Left err -> putStrLn $ show err
143+ putStrLn $ show err
141− reprLoop context
144+ reprLoop context
142
145