on master help sign in
Fix up formatting
commitb5a7ad53d864ccd1fbaa1a18e37ed9c82e18c6ba authorBryan O'Sullivan <bos@serpentine.com> dateWed 22 Jul 2015, 12:51 (11 years ago) parente9623d0
1 file changed+9−10
Data/Aeson/Parser/Internal.hs+9−10
Data/Aeson/Parser/Internal.hs+9−10
@@ -222,24 +222,23 @@ jstring_ = {-# SCC "jstring_" #-} do
222222 case decodeUtf8' s1 of
223223 Right r -> return r
224224 Left err -> fail $ show err
225−#if MIN_VERSION_ghc_prim(0,3,1)
226225 where
226+#if MIN_VERSION_ghc_prim(0,3,1)
227227 isEscaped (S _ escaped) = isTrue# escaped
228228 go (S a b) (W8# c)
229229 | isTrue# a = Just (S 0# b)
230− | isTrue# (word2Int# c ==# 34#) = Nothing
231− | otherwise = let a' = word2Int# c ==# 92#
230+ | isTrue# (word2Int# c ==# 34#) = Nothing -- double quote
231+ | otherwise = let a' = word2Int# c ==# 92# -- backslash
232232 in Just (S a' (orI# a' b))
233233
234234data S = S Int# Int#
235235#else
236− where go (S a b) c
237− | a = Just (S False b)
238− | c == DOUBLE_QUOTE = Nothing
239− | otherwise = let a' = c == backSlash
240− in Just (S a' (a' || b))
241− where backSlash = BACKSLASH
242− isEscaped (S _ escaped) = escaped
236+ isEscaped (S _ escaped) = escaped
237+ go (S a b) c
238+ | a = Just (S False b)
239+ | c == DOUBLE_QUOTE = Nothing
240+ | otherwise = let a' = c == BACKSLASH
241+ in Just (S a' (a' || b))
243242
244243data S = S !Bool !Bool
245244#endif