on master help sign in
Rename to sourceDoc
commit3f0c51aa0dcf504cf95b4900bf12db9f548a3e0e authorJason Felice <jason.m.felice@gmail.com> dateThu 7 Dec 2017, 20:14 (9 years ago) parentcd87fcd
1 file changed+5−5
src/Idris/Output.hs+5−5
src/Idris/Output.hs+5−5
@@ -118,10 +118,10 @@ iWarn fc err =
118118 width (ATagged _ n) = width n
119119 width (ASplit l r) = width l + width r
120120
121− buildHighlightedSource :: Ann -> OutputDoc
122− buildHighlightedSource (AText s) = text s
123− buildHighlightedSource (ATagged a n) = annotate a (buildHighlightedSource n)
124− buildHighlightedSource (ASplit l r) = buildHighlightedSource l <> buildHighlightedSource r
121+ sourceDoc :: Ann -> OutputDoc
122+ sourceDoc (AText s) = text s
123+ sourceDoc (ATagged a n) = annotate a (sourceDoc n)
124+ sourceDoc (ASplit l r) = sourceDoc l <> sourceDoc r
125125
126126 insertAnnotation :: ((Int, Int), OutputAnnotation) -> Ann -> Ann
127127 insertAnnotation ((sj, ej), oa) (ATagged tag n) = ATagged tag (insertAnnotation ((sj, ej), oa) n)
@@ -134,7 +134,7 @@ iWarn fc err =
134134 | otherwise = a
135135
136136 highlightedSource :: OutputDoc
137− highlightedSource = buildHighlightedSource .
137+ highlightedSource = sourceDoc .
138138 foldr insertAnnotation (AText $ fromJust sourceLine) .
139139 map (\(FC _ (_, sj) (_, ej), ann) -> ((sj, ej), ann)) .
140140 map (first (intersection lineFC)) .