Skip to content
Snippets Groups Projects
Commit 785818fe authored by Alec Theriault's avatar Alec Theriault Committed by alexbiehl
Browse files

Remove bang pattern

parent 44b1d875
No related branches found
No related tags found
No related merge requests found
{-# LANGUAGE GeneralizedNewtypeDeriving, TypeFamilies, BangPatterns #-}
{-# LANGUAGE GeneralizedNewtypeDeriving, TypeFamilies #-}
module Documentation.Haddock.Parser.Monad (
module Documentation.Haddock.Parser.Monad
, Attoparsec.isDigit
......@@ -82,8 +82,8 @@ peekUnicode = lift $ Attoparsec.lookAhead $ do
-- attoparsec's take fails on shorter inputs rather than truncate
bs <- Attoparsec.choice (map Attoparsec.take [4,3,2,1])
let !c = head . decodeUtf8 $ bs
!n = Data.ByteString.length . encodeUtf8 $ [c]
let c = head . decodeUtf8 $ bs
n = Data.ByteString.length . encodeUtf8 $ [c]
pure (c, fromIntegral n)
-- | Like 'satisfy', but consuming a unicode character
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment