unicoder-0.5.0: Make writing in unicode easy.

Safe HaskellSafe
LanguageHaskell2010

Text.Unicoder

Contents

Description

Load unicoder configurations and oerform unicoder transformations on text and strings.

Unicoder replaces simple macros with configured strings, e.g.

\E.x. \A.y. x \-> y
\l.x,y. x \of x \of y

becomes

∃x ∀y x → y
λx,y. x ∘ x ∘ y

For more information, see the documentation.

Synopsis

Unicoder Algorithm

unicodize :: Config -> Text -> Text Source #

Perform the unicoder transformation on a Text value.

unicodizeLazy :: Config -> Text -> Text Source #

Perform the unicoder transformation on a lazy Text value.

unicodizeStr :: Config -> String -> String Source #

Perform the unicoder transformation on a String value.

Configuration

data Config Source #

Aggregate all settings needed to unicodize.

loadConfig :: FilePath -> IO (Maybe Config) Source #

Parse the contents of the passed file as unicoder Config

parseConfig :: FilePath -> Text -> Maybe Config Source #

Parse a config file, possibly failing.