Skip to content

Commit 01d9dfa

Browse files
committed
Try to fix bug on GHC 8.0.1 or older
1 parent e6a6f53 commit 01d9dfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Text/Show/Unicode.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ recoverChars p = outsideLiteral
136136
-- * Note that special delimiter sequence "\&" may appear in a string. c.f. <https://www.haskell.org/onlinereport/haskell2010/haskellch2.html#x7-200002.6 Section 2.6 of the Haskell 2010 specification>.
137137
recoverCharInLiteral :: Parser (String, Char)
138138
recoverCharInLiteral =
139-
lexCharParser <|> (("\&", '&') <$ string "\\&")
139+
(("\&", '&') <$ string "\\&") <|> lexCharParser
140140
where
141141
lexCharParser :: Parser (String, Char)
142142
lexCharParser = StateT $ \s ->

0 commit comments

Comments
 (0)