pire-0.2.5

Copyright(c) Andreas Reuleaux 2015 - 2018
LicenseBSD2
MaintainerAndreas Reuleaux <rx@a-rx.info>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Pretty

Contents

Description

pretty printing, approach copied from Ermine and adapted to Pire (and prettyprinter), parts copiedadapted from Pi-forall/

Documentation

prettyExpr :: (Applicative f, MonadReader PrettyInfo f) => Expr t a -> [String] -> Int -> (t -> Int -> f (Doc Ann)) -> (a -> Int -> f (Doc Ann)) -> Flavor -> f (Doc Ann) Source #

prettyExpr_ :: (Applicative f, MonadReader PrettyInfo f) => Expr t a -> [String] -> Int -> (t -> Int -> f (Doc Ann)) -> (a -> Int -> f (Doc Ann)) -> Flavor -> f (Doc Ann) Source #

prettyAnnot :: MonadReader PrettyInfo m => Annot t a -> [String] -> Int -> (t -> Int -> m (Doc Ann)) -> (a -> Int -> m (Doc Ann)) -> Flavor -> m (Doc Ann) Source #

prettyArg :: MonadReader PrettyInfo m => Arg t a -> [String] -> Int -> (t -> Int -> m (Doc Ann)) -> (a -> Int -> m (Doc Ann)) -> m (Doc Ann) Source #

prettyMatch :: MonadReader PrettyInfo m => Match t a -> [String] -> Int -> (t -> Int -> m (Doc Ann)) -> (a -> Int -> m (Doc Ann)) -> Flavor -> m (Doc Ann) Source #

prettyPattern :: Applicative f => Pattern t -> [String] -> Int -> (t -> Int -> f (Doc Ann)) -> f (Doc Ann) Source #

prettyDecl :: (Applicative f, MonadReader PrettyInfo f) => Decl t a -> [String] -> Int -> (t -> Int -> f (Doc Ann)) -> (a -> Int -> f (Doc Ann)) -> Flavor -> f (Doc Ann) Source #

prettyTele :: (Applicative f, MonadReader PrettyInfo f) => Telescope t a -> [String] -> Int -> (t -> Int -> f (Doc Ann)) -> (a -> Int -> f (Doc Ann)) -> Flavor -> f (Doc Ann) Source #

prettyConstructorDef :: (Applicative f, MonadReader PrettyInfo f) => ConstructorDef t a -> [String] -> Int -> (t -> Int -> f (Doc Ann)) -> (a -> Int -> f (Doc Ann)) -> Flavor -> f (Doc Ann) Source #

prettyModule :: (Applicative f, MonadReader PrettyInfo f) => Module t a -> [String] -> Int -> (t -> Int -> f (Doc Ann)) -> (a -> Int -> f (Doc Ann)) -> Flavor -> f (Doc Ann) Source #

lamPatterns :: Applicative f => t -> [String] -> (t -> Int -> f (Doc ann)) -> (HashMap Int String, f (Doc ann)) Source #

Orphan instances

Pretty (Pattern String) Source # 
Instance details

Methods

pretty :: Pattern String -> Doc ann #

prettyList :: [Pattern String] -> Doc ann #

Pretty (Pattern Text) Source # 
Instance details

Methods

pretty :: Pattern Text -> Doc ann #

prettyList :: [Pattern Text] -> Doc ann #

PrettyAnn (Pattern String) Source # 
Instance details

PrettyAnn (Pattern Text) Source # 
Instance details

Pretty (Module String String) Source # 
Instance details

Pretty (Module Text Text) Source # 
Instance details

Methods

pretty :: Module Text Text -> Doc ann #

prettyList :: [Module Text Text] -> Doc ann #

Pretty (ConstructorDef String String) Source # 
Instance details

Pretty (ConstructorDef Text Text) Source # 
Instance details

Pretty (Telescope String String) Source # 
Instance details

Pretty (Telescope Text Text) Source # 
Instance details

Methods

pretty :: Telescope Text Text -> Doc ann #

prettyList :: [Telescope Text Text] -> Doc ann #

Pretty (Decl String String) Source # 
Instance details

Methods

pretty :: Decl String String -> Doc ann #

prettyList :: [Decl String String] -> Doc ann #

Pretty (Decl Text Text) Source # 
Instance details

Methods

pretty :: Decl Text Text -> Doc ann #

prettyList :: [Decl Text Text] -> Doc ann #

Pretty (Arg String String) Source # 
Instance details

Methods

pretty :: Arg String String -> Doc ann #

prettyList :: [Arg String String] -> Doc ann #

Pretty (Arg Text Text) Source # 
Instance details

Methods

pretty :: Arg Text Text -> Doc ann #

prettyList :: [Arg Text Text] -> Doc ann #

Pretty (Match String String) Source # 
Instance details

Methods

pretty :: Match String String -> Doc ann #

prettyList :: [Match String String] -> Doc ann #

Pretty (Match Text Text) Source # 
Instance details

Methods

pretty :: Match Text Text -> Doc ann #

prettyList :: [Match Text Text] -> Doc ann #

Pretty (Expr String String) Source # 
Instance details

Methods

pretty :: Expr String String -> Doc ann #

prettyList :: [Expr String String] -> Doc ann #

Pretty (Expr Text Text) Source # 
Instance details

Methods

pretty :: Expr Text Text -> Doc ann #

prettyList :: [Expr Text Text] -> Doc ann #

PrettyAnn (Module String String) Source # 
Instance details

PrettyAnn (Module Text Text) Source # 
Instance details

PrettyAnn (ConstructorDef String String) Source # 
Instance details

PrettyAnn (ConstructorDef Text Text) Source # 
Instance details

PrettyAnn (Telescope String String) Source # 
Instance details

PrettyAnn (Telescope Text Text) Source # 
Instance details

PrettyAnn (Decl String String) Source # 
Instance details

PrettyAnn (Decl Text Text) Source # 
Instance details

PrettyAnn (Arg String String) Source # 
Instance details

PrettyAnn (Arg Text Text) Source # 
Instance details

PrettyAnn (Match String String) Source # 
Instance details

PrettyAnn (Match Text Text) Source # 
Instance details

PrettyAnn (Annot Text Text) Source # 
Instance details

PrettyAnn (Expr String String) Source # 
Instance details

PrettyAnn (Expr Text Text) Source # 
Instance details