on master help sign in
Be a bit more conservative about highlighting output
commitacdf90ff68233d15cf5f8425e225b49b161ee1a8 authorDavid Raymond Christiansen <david@davidchristiansen.dk> dateMon 11 May 2015, 17:40 (11 years ago) parent45ca5b5
2 files changed+6−2
src/Idris/AbsSyntax.hs+1−1 src/Idris/Output.hs+5−1
src/Idris/AbsSyntax.hs+1−1
@@ -1690,7 +1690,7 @@ aiFn inpat expat qq imp_meths ist fc f ffc ds as
16901690 _ -> Public
16911691
16921692 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)
16941694
16951695 exp (PExp _ _ _ _) = True
16961696 exp (PConstraint _ _ _ _) = True
src/Idris/Output.hs+5−1
@@ -201,12 +201,16 @@ sendHighlighting highlights =
201201 case idris_outputmode ist of
202202 RawOutput _ -> return ()
203203 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+ ]
205207 in runIO . hPutStrLn h $
206208 convSExp "output"
207209 (SymbolAtom "ok",
208210 (SymbolAtom "highlight-source", fancier)) n
209211
212+ where fullFC (FC _ _ _) = True
213+ fullFC _ = False
210214
211215
212216renderExternal :: OutputFmt -> Int -> Doc OutputAnnotation -> Idris String