-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Parser and pretty printer for Egison pattern expressions in Haskell source code -- -- egison-pattern-src-haskell-mode provides a parser and pretty -- printer for egison-pattern-src to use it in Haskell source -- code. See https://github.com/egison/egison-pattern-src for more -- information. @package egison-pattern-src-haskell-mode @version 0.2.1.2 -- | A parser for Egison pattern expressions in Haskell source code. module Language.Egison.Parser.Pattern.Mode.Haskell -- | Type synonym of Expr to be parsed in Haskell's source code. type Expr = Expr (QName ()) (Name ()) (Exp SrcSpanInfo) -- | Type synonym of ExprL to be parsed in Haskell's source code. type ExprL = ExprL (QName ()) (Name ()) (Exp SrcSpanInfo) -- | Parser configuration in egison-pattern-src-haskell-mode. data ParseMode ParseMode :: ParseMode -> Maybe [ParseFixity (QName ()) 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 (QName ()) 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 (QName ()) (Name ()) (Exp SrcSpanInfo) String -- | Build Fixity using Fixity from -- haskell-src-exts. makeFixity :: Fixity -> Fixity (QName ()) -- | Build ParseFixity using Fixity to parse Haskell-style -- operators makeParseFixity :: Fixity (QName ()) -> Maybe (ParseFixity (QName ()) String) instance Language.Egison.Parser.Pattern.Parsable.Parsable Language.Egison.Parser.Pattern.Mode.Haskell.Expr GHC.Base.String Language.Egison.Parser.Pattern.Mode.Haskell.ParseMode -- | A printer for Egison pattern expressions in Haskell source code. module Language.Egison.Pretty.Pattern.Mode.Haskell -- | Type synonym of Expr to be printed with Haskell's source code. type Expr = Expr (QName ()) (Name ()) (Exp ()) -- | Print Expr using Style and PPHsMode from -- haskell-src-exts. prettyExpr :: MonadError (Error (QName ())) m => Style -> PPHsMode -> Expr -> m Text -- | Print Expr using Style and PPHsMode from -- haskell-src-exts, while supplying an explicit list of -- Fixity. prettyExprWithFixities :: MonadError (Error (QName ())) m => Style -> PPHsMode -> [Fixity] -> Expr -> m Text -- | Type synonym of PrintMode to print Expr. type PrintMode = PrintMode (QName ()) (Name ()) (Exp ()) -- | Type synonym of PrintFixity to print Expr. type PrintFixity = PrintFixity (QName ()) -- | Type synonym of Fixity to print Expr. type Fixity = Fixity (QName ()) -- | Build PageMode using Style from -- haskell-src-exts. makePageMode :: Style -> PageMode -- | Build PrintMode using Style and PPHsMode from -- haskell-src-exts, and the list of fixities. makeHaskellMode :: Style -> PPHsMode -> [Fixity] -> PrintMode -- | Build PrintFixity using Fixity to print Haskell -- operators. makePrintFixity :: Fixity -> PrintFixity