-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Parser and pretty printer for Egison pattern expressions to use with TH
--
-- egison-pattern-src-th-mode provides a parser and pretty
-- printer for egison-pattern-src to use it with Template
-- Haskell. See https://github.com/egison/egison-pattern-src for
-- more information.
@package egison-pattern-src-th-mode
@version 0.2.1.2
-- | A parser for Egison pattern expressions to use with Template Haskell.
module Language.Egison.Parser.Pattern.Mode.Haskell.TH
-- | Type synonym of Expr to be used with Template Haskell.
type Expr = Expr Name Name Exp
-- | Type synonym of ExprL to be used with Template Haskell.
type ExprL = ExprL Name Name Exp
-- | Parser configuration in egison-pattern-src-th-mode.
data ParseMode
ParseMode :: ParseMode -> Maybe [ParseFixity Name String] -> ParseMode
-- | ParseMode from haskell-src-exts for our parsers to
-- base on.
[haskellMode] :: ParseMode -> ParseMode
-- | List of fixities to parse infix pattern operators. If fixities =
-- Just xs, xs overrides fixities obtained from
-- haskellMode. Otherwise, our parsers use fixities from
-- haskellMode.
[fixities] :: ParseMode -> Maybe [ParseFixity Name String]
-- | Parse Expr using ParseMode.
parseExpr :: MonadError (Errors String) m => ParseMode -> String -> m Expr
-- | Parse Expr using ParseMode with locations annotated.
parseExprL :: MonadError (Errors String) m => ParseMode -> String -> m ExprL
-- | Build ParseMode using ParseMode from
-- haskell-src-exts.
makeParseMode :: ParseMode -> ParseMode Name Name Exp String
-- | Build Fixity using Fixity from
-- haskell-src-exts.
makeFixity :: Fixity -> Fixity Name
-- | Build ParseFixity using Fixity to parse Haskell-style
-- operators
makeParseFixity :: Fixity Name -> ParseFixity Name String
instance Language.Egison.Parser.Pattern.Parsable.Parsable Language.Egison.Parser.Pattern.Mode.Haskell.TH.Expr GHC.Base.String Language.Egison.Parser.Pattern.Mode.Haskell.TH.ParseMode
-- | A printer for Egison pattern expressions to use with Template Haskell.
module Language.Egison.Pretty.Pattern.Mode.Haskell.TH
-- | Type synonym of Expr to be printed with Template Haskell.
type Expr = Expr Name Name Exp
-- | Print Expr.
prettyExpr :: MonadError (Error Name) m => Expr -> m Text
-- | Print Expr with an explicit list of Fixity.
prettyExprWithFixities :: MonadError (Error Name) m => [Fixity] -> Expr -> m Text
-- | Type synonym of PrintMode to print Expr.
type PrintMode = PrintMode Name Name Exp
-- | Type synonym of PrintFixity to print Expr.
type PrintFixity = PrintFixity Name
-- | Type synonym of Fixity to print Expr.
type Fixity = Fixity Name
-- | Build PrintMode using the list of fixities.
makeTHMode :: [Fixity] -> PrintMode
-- | Build PrintFixity using Fixity to print Haskell
-- operators.
makePrintFixity :: Fixity -> PrintFixity