on master help sign in
Merge pull request #1461 from david-christiansen/issue/1460
02f7c64David Christiansen
src/Idris/Interactive.hs+5−1
@@ -28,6 +28,7 @@ import System.Directory
28import System.IO
28import System.IO
29import Data.Char
29import Data.Char
30import Data.Maybe (fromMaybe)
30import Data.Maybe (fromMaybe)
31+import Data.List (isSuffixOf)
31
32
32import Debug.Trace
33import Debug.Trace
33
34
@@ -122,10 +123,13 @@ addMissing fn updatefile l n
122 getAppName (PRef _ r) = r
123 getAppName (PRef _ r) = r
123 getAppName _ = n
124 getAppName _ = n
124
125
126+ makeIndent ind | ".lidr" `isSuffixOf` fn = '>' : ' ' : replicate (ind-2) ' '
127+ | otherwise = replicate ind ' '
128+
125 showNew nm i ind (tm : tms)
129 showNew nm i ind (tm : tms)
126 = do (nm', i') <- getUniq nm i
130 = do (nm', i') <- getUniq nm i
127 rest <- showNew nm i' ind tms
131 rest <- showNew nm i' ind tms
128− return (replicate ind ' ' ++
132+ return (makeIndent ind ++
129 showPat tm ++ " = ?" ++ nm' ++
133 showPat tm ++ " = ?" ++ nm' ++
130 "\n" ++ rest)
134 "\n" ++ rest)
131 showNew nm i _ [] = return ""
135 showNew nm i _ [] = return ""