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

Agda.Compiler.JS.Pretty

Synopsis

Documentation

data JSModuleStyle Source #

Constructors

JSCJS 
JSAMD 

Instances

Instances details
Generic JSModuleStyle Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Associated Types

type Rep JSModuleStyle 
Instance details

Defined in Agda.Compiler.JS.Pretty

type Rep JSModuleStyle = D1 ('MetaData "JSModuleStyle" "Agda.Compiler.JS.Pretty" "Agda-2.6.4.3-inplace" 'False) (C1 ('MetaCons "JSCJS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JSAMD" 'PrefixI 'False) (U1 :: Type -> Type))
NFData JSModuleStyle Source # 
Instance details

Defined in Agda.Compiler.JS.Compiler

Methods

rnf :: JSModuleStyle -> () #

type Rep JSModuleStyle Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

type Rep JSModuleStyle = D1 ('MetaData "JSModuleStyle" "Agda.Compiler.JS.Pretty" "Agda-2.6.4.3-inplace" 'False) (C1 ('MetaCons "JSCJS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JSAMD" 'PrefixI 'False) (U1 :: Type -> Type))

data Doc Source #

Instances

Instances details
IsString Doc Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

fromString :: String -> Doc #

Monoid Doc Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

mempty :: Doc #

mappend :: Doc -> Doc -> Doc #

mconcat :: [Doc] -> 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 #

($+$) :: 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, JSModuleStyle) -> a -> Doc Source #

Instances

Instances details
Pretty Comment Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Pretty Exp Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Methods

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

Pretty GlobalId Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Pretty LocalId Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Pretty MemberId Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

Pretty Module Source # 
Instance details

Defined in Agda.Compiler.JS.Pretty

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

Defined in Agda.Compiler.JS.Pretty

Methods

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

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

Defined in Agda.Compiler.JS.Pretty

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

Defined in Agda.Compiler.JS.Pretty

Methods

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

class Pretties a where Source #

Methods

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

Instances

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

Defined in Agda.Compiler.JS.Pretty

Methods

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

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

Defined in Agda.Compiler.JS.Pretty

Methods

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

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

Defined in Agda.Compiler.JS.Pretty

Methods

pretties :: (Nat, Bool, JSModuleStyle) -> Map a b -> [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.