Agda-2.6.2.2: A dependently typed functional programming language and proof assistant
Safe HaskellNone
LanguageHaskell2010

Agda.Compiler.JS.Pretty

Synopsis

Documentation

data Doc Source #

Instances

Instances details
IsString Doc Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

fromString :: String -> Doc #

Semigroup Doc Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

(<>) :: Doc -> Doc -> Doc #

sconcat :: NonEmpty Doc -> Doc #

stimes :: Integral b => b -> Doc -> Doc #

Monoid Doc Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

mempty :: Doc #

mappend :: Doc -> Doc -> Doc #

mconcat :: [Doc] -> Doc #

($+$) :: Doc -> Doc -> Doc infixr 5 Source #

($++$) :: Doc -> Doc -> Doc infixr 5 Source #

Separate by blank line.

(<+>) :: Doc -> Doc -> Doc infixr 6 Source #

Separate by space that will be removed by minify.

For non-removable space, use d <> " " <> d'.

enclose :: Doc -> Doc -> Doc -> Doc Source #

hcat :: [Doc] -> Doc Source #

vcat :: [Doc] -> Doc Source #

vsep :: [Doc] -> Doc Source #

Concatenate vertically, separated by blank lines.

mparens :: Bool -> Doc -> Doc Source #

Apply parens to Doc if boolean is true.

class Pretty a where Source #

Methods

pretty :: (Nat, Bool) -> a -> Doc Source #

Instances

Instances details
Pretty Module Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

pretty :: (Nat, Bool) -> Module -> Doc Source #

Pretty Comment Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

pretty :: (Nat, Bool) -> Comment -> Doc Source #

Pretty MemberId Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

pretty :: (Nat, Bool) -> MemberId -> Doc Source #

Pretty GlobalId Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

pretty :: (Nat, Bool) -> GlobalId -> Doc Source #

Pretty LocalId Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

pretty :: (Nat, Bool) -> LocalId -> Doc Source #

Pretty Exp Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

pretty :: (Nat, Bool) -> Exp -> Doc Source #

Pretty [(GlobalId, Export)] Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

pretty :: (Nat, Bool) -> [(GlobalId, Export)] -> Doc Source #

Pretty a => Pretty (Maybe a) Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

pretty :: (Nat, Bool) -> Maybe a -> Doc Source #

(Pretty a, Pretty b) => Pretty (a, b) Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

pretty :: (Nat, Bool) -> (a, b) -> Doc Source #

class Pretties a where Source #

Methods

pretties :: (Nat, Bool) -> a -> [Doc] Source #

Instances

Instances details
Pretty a => Pretties [a] Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

pretties :: (Nat, Bool) -> [a] -> [Doc] Source #

Pretty a => Pretties (List1 a) Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

pretties :: (Nat, Bool) -> List1 a -> [Doc] Source #

(Pretty a, Pretty b) => Pretties (Map a b) Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

pretties :: (Nat, Bool) -> Map a b -> [Doc] Source #

block :: (Nat, Bool) -> Exp -> Doc Source #

isValidJSIdent :: String -> Bool Source #

Check if a string is a valid JS identifier. The check ignores keywords as we prepend z_ to our identifiers. The check is conservative and may not admit all valid JS identifiers.