on master help sign in
Merge pull request #1400 from elm-lang/dev
fbd2b39Evan Czaplicki
src/Reporting/Report.hs+3−25
@@ -13,8 +13,8 @@ import Data.Aeson ((.=))
13import qualified Data.Aeson.Types as Json
13import qualified Data.Aeson.Types as Json
14import System.IO (Handle)
14import System.IO (Handle)
15import Text.PrettyPrint.ANSI.Leijen
15import Text.PrettyPrint.ANSI.Leijen
16− ( Doc, SimpleDoc(..), (<>), displayS, displayIO, dullcyan, fillSep
16+ ( Doc, (<>), displayS, displayIO, dullcyan, fillSep
17− , hardline, renderPretty, text
17+ , hardline, plain, renderPretty, text
18 )
18 )
19
19
20import qualified Reporting.Region as R
20import qualified Reporting.Region as R
@@ -102,27 +102,5 @@ toString location region rprt source =
102
102
103nonAnsiRender :: Doc -> String
103nonAnsiRender :: Doc -> String
104nonAnsiRender doc =
104nonAnsiRender doc =
105− displayS (stripAnsi (renderPretty 1 80 doc)) ""
105+ displayS (renderPretty 1 80 (plain doc)) ""
106−
107−
108−stripAnsi :: SimpleDoc -> SimpleDoc
109−stripAnsi simpleDoc =
110− case simpleDoc of
111− SFail ->
112− SFail
113−
114− SEmpty ->
115− SEmpty
116−
117− SChar chr subDoc ->
118− SChar chr (stripAnsi subDoc)
119−
120− SText n str subDoc ->
121− SText n str (stripAnsi subDoc)
122−
123− SLine n subDoc ->
124− SLine n (stripAnsi subDoc)
125−
126− SSGR _ subDoc ->
127− stripAnsi subDoc
128
106