reorganise make stuff
This commit is contained in:
parent
0f0073ba77
commit
59c226111e
4 changed files with 106 additions and 38 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue