diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Emoji/TH.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Emoji/TH.hs b/src/Text/Pandoc/Emoji/TH.hs index a2e11e430..bf3ed0c16 100644 --- a/src/Text/Pandoc/Emoji/TH.hs +++ b/src/Text/Pandoc/Emoji/TH.hs @@ -1,5 +1,6 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TemplateHaskellQuotes #-} {- | Module : Text.Pandoc.Emoji.TH Copyright : Copyright (C) 2019 John MacFarlane @@ -24,12 +25,11 @@ genEmojis fp = do bs <- runIO $ B.readFile fp case eitherDecode bs of Left e -> error e - Right (emoji :: [Emoji]) -> - return $ ListE - [TupE [ LitE (StringL alias), - LitE (StringL txt) ] - | Emoji txt aliases <- emoji - , alias <- aliases] + Right (emoji :: [Emoji]) -> [| emojis |] + where emojis = [ (alias, txt) + | Emoji txt aliases <- emoji + , alias <- aliases + ] data Emoji = Emoji String [String] deriving Show |