Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: glguy/utf8-string
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cb0e60e9adfe4d8c4984d80d9ad0e08f38dccfec
Choose a base ref
..
head repository: glguy/utf8-string
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 21bd1b298e5e2ecc2f0526550128c5fcdff10b4d
Choose a head ref
Showing with 1 addition and 2 deletions.
  1. +1 −2 Codec/Binary/UTF8/String.hs
3 changes: 1 addition & 2 deletions Codec/Binary/UTF8/String.hs
Original file line number Diff line number Diff line change
@@ -91,11 +91,10 @@ encodeChar = fmap fromIntegral . go . ord
]
#endif


-- | Encode a Haskell 'String' to a list of 'Word8' values, in UTF8 format.
encode :: String -> [Word8]
#if __GLASGOW_HASKELL__ < 802
encode = concatMap (\(x, xs) -> x:xs . encodeChar)
encode = concatMap ((\(x, xs) -> x:xs) . encodeChar)
#else
encode = concatMap (NE.toList . encodeChar)
#endif