on master help sign in
switch to ES.String in pattern error code
commit19baa2543350d903ea1a66e86578931abc03d786 authorEvan Czaplicki <evancz@users.noreply.github.com> dateMon 3 Jun 2019, 16:38 (7 years ago) parentb8f1676
1 file changed+3−2
compiler/src/Reporting/Error/Pattern.hs+3−2
compiler/src/Reporting/Error/Pattern.hs+3−2
@@ -8,6 +8,7 @@ module Reporting.Error.Pattern
88
99import qualified Data.List as List
1010
11+import qualified Elm.String as ES
1112import qualified Nitpick.PatternMatches as P
1213import Reporting.Doc ((<>))
1314import qualified Reporting.Doc as D
@@ -117,10 +118,10 @@ patternToDoc context pattern =
117118 NonList (P.Literal literal) ->
118119 case literal of
119120 P.Chr chr ->
120− "'" <> D.fromUtf8 chr <> "'"
121+ "'" <> D.fromChars (ES.toChars chr) <> "'"
121122
122123 P.Str str ->
123− "\"" <> D.fromUtf8 str <> "\""
124+ "\"" <> D.fromChars (ES.toChars str) <> "\""
124125
125126 P.Int int ->
126127 D.fromInt int