on master help sign in
Merge pull request #1669 from soimort/fix-runIdeSlaveCommand
ddb2a54Edwin Brady
src/Idris/REPL.hs+4−3
@@ -295,6 +295,7 @@ runIdeSlaveCommand h id orig fn mods (IdeSlave.Interpret cmd) =
295 Success (Right cmd) -> idrisCatch
295 Success (Right cmd) -> idrisCatch
296 (ideslaveProcess fn cmd)
296 (ideslaveProcess fn cmd)
297 (\e -> getIState >>= iRenderError . flip pprintErr e)
297 (\e -> getIState >>= iRenderError . flip pprintErr e)
298+ Success (Left err) -> iPrintError err
298runIdeSlaveCommand h id orig fn mods (IdeSlave.REPLCompletions str) =
299runIdeSlaveCommand h id orig fn mods (IdeSlave.REPLCompletions str) =
299 do (unused, compls) <- replCompletion (reverse str, "")
300 do (unused, compls) <- replCompletion (reverse str, "")
300 let good = IdeSlave.SexpList [IdeSlave.SymbolAtom "ok",
301 let good = IdeSlave.SexpList [IdeSlave.SymbolAtom "ok",
@@ -756,7 +757,7 @@ process fn (NewDefn decls) = do
756 defineName (PFix fc fixity strs : defns) = do
757 defineName (PFix fc fixity strs : defns) = do
757 fmodifyState idris_fixities (map (Fix fixity) strs ++)
758 fmodifyState idris_fixities (map (Fix fixity) strs ++)
758 unless (null defns) $ defineName defns
759 unless (null defns) $ defineName defns
759− defineName (PSyntax _ syntax:_) = do
760+ defineName (PSyntax _ syntax:_) = do
760 i <- get
761 i <- get
761 put (addReplSyntax i syntax)
762 put (addReplSyntax i syntax)
762 defineName decls = do
763 defineName decls = do
@@ -1216,7 +1217,7 @@ process fn (TransformInfo n)
1216 delab i $ tm
1217 delab i $ tm
1217 ts' = showTrans i ts in
1218 ts' = showTrans i ts in
1218 ppTm lhs <+> text " ==> " <+> ppTm rhs : ts'
1219 ppTm lhs <+> text " ==> " <+> ppTm rhs : ts'
1219−
1220+
1220-- iRenderOutput (pretty lhs)
1221-- iRenderOutput (pretty lhs)
1221-- iputStrLn " ==> "
1222-- iputStrLn " ==> "
1222-- iPrintTermWithType (pprintDelab i rhs)
1223-- iPrintTermWithType (pprintDelab i rhs)
@@ -1723,7 +1724,7 @@ getOptLevel _ = Nothing
1723
1724
1724getOptimisation :: Opt -> Maybe (Idris ())
1725getOptimisation :: Opt -> Maybe (Idris ())
1725getOptimisation (AddOpt p) = Just $ addOptimise p
1726getOptimisation (AddOpt p) = Just $ addOptimise p
1726−getOptimisation (RemoveOpt p) = Just $ removeOptimise p
1727+getOptimisation (RemoveOpt p) = Just $ removeOptimise p
1727getOptimisation _ = Nothing
1728getOptimisation _ = Nothing
1728
1729
1729getColour :: Opt -> Maybe Bool
1730getColour :: Opt -> Maybe Bool