diff options
author | lukasepple <git@lukasepple.de> | 2015-11-03 13:32:58 +0100 |
---|---|---|
committer | lukasepple <git@lukasepple.de> | 2015-11-03 13:32:58 +0100 |
commit | 567e21d7ab6ac5e2cd9a55b86deb9030d83d367e (patch) | |
tree | 0a942e1dd8902e6d1aa063b900b5f716190247c5 | |
parent | ba0791f2959b050ba545c471a7f99d5151e687ae (diff) |
Add IO action which actually parses the data file
-rw-r--r-- | src/Text/Emoji/Data.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Emoji/Data.hs b/src/Text/Emoji/Data.hs index 2c6e51a..fb9715a 100644 --- a/src/Text/Emoji/Data.hs +++ b/src/Text/Emoji/Data.hs @@ -8,7 +8,6 @@ unicode consortium. -} -{-# LANGUAGE OverloadedStrings #-} module Text.Emoji.Data where import Text.Emoji.Types @@ -22,6 +21,11 @@ import Text.Parsec import Text.Parsec.String import Numeric (readHex) + +-- | Runs the parser on the specified data file. +parseDataFile :: FilePath -> IO (Either ParseError [Either String Emoji]) +parseDataFile path = parseFromFile emojiDataFile path + -- | Parses the entire emoji-data.txt file. -- Left String is a comment line. -- Right Emoji is a line describing an emoji character. |