diff options
author | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2020-08-29 13:42:45 +0200 |
---|---|---|
committer | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2020-08-29 13:42:45 +0200 |
commit | d8e406c4f68e253f931031fdf1985f30fa1723e8 (patch) | |
tree | ff2ee485122f3f0a3b90d1da5f1e2fe1da4f263d | |
parent | 2a065c40d9225d04644d7b3413ac81effe52f108 (diff) |
refactor(DataFiles): make parser warning free
-rw-r--r-- | src/Text/Emoji/DataFiles.hs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Text/Emoji/DataFiles.hs b/src/Text/Emoji/DataFiles.hs index 72f37ca..d99646a 100644 --- a/src/Text/Emoji/DataFiles.hs +++ b/src/Text/Emoji/DataFiles.hs @@ -12,7 +12,7 @@ import Prelude hiding (takeWhile) import Text.Emoji.Types import Control.Applicative ((<|>)) -import Data.Attoparsec.Text (Parser (..), takeWhile1, takeWhile, string, choice +import Data.Attoparsec.Text (Parser (), takeWhile1, takeWhile, string, choice , notInClass, skipWhile, skipMany, isHorizontalSpace , decimal, hexadecimal, char, many1, endOfLine) import Data.Text (Text) @@ -57,11 +57,11 @@ statusColumn = emojiTestGroup :: EmojiTestGroupLevel -> Parser EmojiTestEntry emojiTestGroup maxLevel = do - char '#' + _ <- char '#' skipSpace - string $ groupLevelText maxLevel - char ':' + _ <- string $ groupLevelText maxLevel + _ <- char ':' skipSpace name <- takeWhile1 notEol @@ -79,9 +79,9 @@ emojiTestGroup maxLevel = do emojiVersionColumn :: Parser EmojiVersion emojiVersionColumn = do - char 'E' + _ <- char 'E' major <- decimal - char '.' + _ <- char '.' minor <- decimal pure $ case major of 0 -> case minor of @@ -97,11 +97,11 @@ emojiTestEntryLine = do codePoints <- codePointsColumn skipSpace - string "; " + _ <- string "; " status <- statusColumn skipSpace - string "# " + _ <- string "# " skipWhile (notInClass "E") version <- emojiVersionColumn skipSpace @@ -113,7 +113,7 @@ emojiTestEntryLine = do emojiTestCommentLine :: Parser EmojiTestEntry emojiTestCommentLine = do - char '#' + _ <- char '#' skipSpace text <- takeWhile notEol <* skipMany endOfLine if "group:" `T.isPrefixOf` text || "subgroup:" `T.isPrefixOf` text |