@@ -77,13 +77,13 @@ elabStep st e = do case runStateT e st of
77 Error a -> do i <- getIState
77 Error a -> do i <- getIState
78 fail (pshow i a)
78 fail (pshow i a)
80−dumpState :: IState -> ProofState -> IO ()
80+dumpState :: IState -> ProofState -> Idris ()
81dumpState ist (PS nm [] _ _ tm _ _ _ _ _ _ _ _ _ _ _ _ _ _) =
81dumpState ist (PS nm [] _ _ tm _ _ _ _ _ _ _ _ _ _ _ _ _ _) =
82− putStrLn . render $ pretty nm <> colon <+> text "No more goals."
82+ iputGoal . render $ pretty nm <> colon <+> text "No more goals."
83dumpState ist ps@(PS nm (h:hs) _ _ tm _ _ _ _ _ _ problems i _ _ ctxy _ _ _) = do
83dumpState ist ps@(PS nm (h:hs) _ _ tm _ _ _ _ _ _ problems i _ _ ctxy _ _ _) = do
84 let OK ty = goalAtFocus ps
84 let OK ty = goalAtFocus ps
85 let OK env = envAtFocus ps
85 let OK env = envAtFocus ps
86− putStrLn . render $
86+ iputGoal . render $
87 prettyOtherGoals hs $$
87 prettyOtherGoals hs $$
88 prettyAssumptions env $$
88 prettyAssumptions env $$
89 prettyGoal ty
89 prettyGoal ty
@@ -127,15 +127,19 @@ lifte st e = do (v, _) <- elabStep st e
127ploop :: Bool -> String -> [String] -> ElabState [PDecl] -> Maybe History -> Idris (Term, [String])
127ploop :: Bool -> String -> [String] -> ElabState [PDecl] -> Maybe History -> Idris (Term, [String])
128ploop d prompt prf e h
128ploop d prompt prf e h
129 = do i <- getIState
129 = do i <- getIState
130− when d $ liftIO $ dumpState i (proof e)
130+ when d $ dumpState i (proof e)
132+ case idris_outputmode i of
131− (x, h') <- runInputT (proverSettings e) $
133+ RawOutput -> runInputT (proverSettings e) $
132− -- Manually track the history so that we can use the proof state
134+ -- Manually track the history so that we can use the proof state
133− do _ <- case h of
135+ do _ <- case h of
134− Just history -> putHistory history
136+ Just history -> putHistory history
135− Nothing -> return ()
137+ Nothing -> return ()
136− l <- getInputLine (prompt ++ "> ")
138+ l <- getInputLine (prompt ++ "> ")
137− h' <- getHistory
139+ h' <- getHistory
138− return (l, Just h')
140+ return (l, Just h')
141+ IdeSlave n -> -- setprompt -- waitforinput
142+ return (Just "trivial", h)
139 (cmd, step) <- case x of
143 (cmd, step) <- case x of
140 Nothing -> fail "Abandoned"
144 Nothing -> fail "Abandoned"
141 Just input -> do return (parseTac i input, input)
145 Just input -> do return (parseTac i input, input)