reorganise make stuff

This commit is contained in:
Rhiannon Morris 2020-07-24 15:20:10 +02:00
parent 0f0073ba77
commit 59c226111e
4 changed files with 106 additions and 38 deletions

View file

@ -1,5 +1,9 @@
{-# LANGUAGE TemplateHaskell #-}
module BuilderQQ (b, Builder, toLazyText, fromText, fromString, fromChar) where
module BuilderQQ
(b,
Builder, toLazyText, fromText, fromString, fromChar,
textMap)
where
import Data.Char (isLower, isSpace, isDigit, isAlphaNum)
import Language.Haskell.TH
@ -179,3 +183,6 @@ pattern c :. t <- (Text.uncons -> Just (c, t))
fromChar :: Char -> Builder
fromChar = singleton
textMap :: (Char -> Builder) -> Text -> Builder
textMap f = Text.foldl' (\buf c -> buf <> f c) mempty