on master help sign in
Be a bit more conservative about highlighting output
acdf90fDavid Raymond Christiansen
src/Idris/AbsSyntax.hs+1−1
@@ -1690,7 +1690,7 @@ aiFn inpat expat qq imp_meths ist fc f ffc ds as
1690 _ -> Public
1690 _ -> Public
1691
1691
1692 insertImpl :: [PArg] -> [PArg] -> [PArg]
1692 insertImpl :: [PArg] -> [PArg] -> [PArg]
1693− insertImpl ps as = insImpAcc M.empty ps (filter exp as) (filter (not.exp) as)
1693+ insertImpl ps as = insImpAcc M.empty ps (filter exp as) (filter (not . exp) as)
1694
1694
1695 exp (PExp _ _ _ _) = True
1695 exp (PExp _ _ _ _) = True
1696 exp (PConstraint _ _ _ _) = True
1696 exp (PConstraint _ _ _ _) = True
src/Idris/Output.hs+5−1
@@ -201,12 +201,16 @@ sendHighlighting highlights =
201 case idris_outputmode ist of
201 case idris_outputmode ist of
202 RawOutput _ -> return ()
202 RawOutput _ -> return ()
203 IdeMode n h ->
203 IdeMode n h ->
204− let fancier = [toSExp (fc, fancifyAnnots ist False annot) | (fc, annot) <- highlights]
204+ let fancier = [ toSExp (fc, fancifyAnnots ist False annot)
205+ | (fc, annot) <- highlights, fullFC fc
206+ ]
205 in runIO . hPutStrLn h $
207 in runIO . hPutStrLn h $
206 convSExp "output"
208 convSExp "output"
207 (SymbolAtom "ok",
209 (SymbolAtom "ok",
208 (SymbolAtom "highlight-source", fancier)) n
210 (SymbolAtom "highlight-source", fancier)) n
209
211
212+ where fullFC (FC _ _ _) = True
213+ fullFC _ = False
210
214
211
215
212renderExternal :: OutputFmt -> Int -> Doc OutputAnnotation -> Idris String
216renderExternal :: OutputFmt -> Int -> Doc OutputAnnotation -> Idris String