@@ -978,21 +978,20 @@ process h fn (Apropos a) =
978978
979979-- IdrisDoc
980980process h fn (MakeDoc s) =
981− do istate <- getIState
982− outputTarget <- runIO $ getCurrentDirectory
983− let trim = dropWhile isSpace
984− s' = trim s
985− (trace, s'') = case (stripPrefix "notrace" s') of Just x -> (False, trim x)
986− Nothing -> (True, s')
987− target = let (front, back) = span (not . isSpace) s''
988− in if front == "ns" then Namespace (trim back)
989− else if front == "dir" then Dir (trim back)
990− else if null s'' then Dir outputTarget
991− else Namespace (s'')
992− result <- runIO $ generateDocs istate target outputTarget trace
981+ do istate <- getIState
982+ outputTarget <- runIO $ getCurrentDirectory
983+ let trim = dropWhile isSpace
984+ s' = trim s
985+ (trace, s'') = case (stripPrefix "notrace" s') of Just x -> (False, trim x)
986+ Nothing -> (True, s')
987+ target = let (front, back) = span (not . isSpace) s''
988+ in if front == "ns" then Namespace (trim back)
989+ else if front == "dir" then Dir (trim back)
990+ else if null s'' then Dir outputTarget
991+ else Namespace (s'')
992+ result <- runIO $ generateDocs istate target outputTarget trace
993993 case result of Right _ -> iputStrLn "IdrisDoc generated"
994− Left err -> let u = "Usage: :mkdoc [notrace] [ns | dir] [TARGET]"
995− in iPrintError err ++ "\n" ++ u
994+ Left err -> iPrintError (err ++ "\n" ++ idrisDocUsage)
996995
997996classInfo :: ClassInfo -> Idris ()
998997classInfo ci = do iputStrLn "Methods:\n"