Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Doc
- minifiedCodeLinesLength :: Int
- render :: Bool -> Doc -> String
- ($+$) :: Doc -> Doc -> Doc
- ($++$) :: Doc -> Doc -> Doc
- (<+>) :: Doc -> Doc -> Doc
- text :: String -> Doc
- group :: Doc -> Doc
- indentBy :: Int -> Doc -> Doc
- enclose :: Doc -> Doc -> Doc -> Doc
- space :: Doc
- indent :: Doc -> Doc
- hcat :: [Doc] -> Doc
- vcat :: [Doc] -> Doc
- vsep :: [Doc] -> Doc
- punctuate :: Doc -> [Doc] -> Doc
- parens :: Doc -> Doc
- brackets :: Doc -> Doc
- braces :: Doc -> Doc
- mparens :: Bool -> Doc -> Doc
- unescape :: Char -> String
- unescapes :: String -> Doc
- class Pretty a where
- prettyShow :: Pretty a => Bool -> a -> String
- class Pretties a where
- block :: (Nat, Bool) -> Exp -> Doc
- modname :: GlobalId -> Doc
- exports :: (Nat, Bool) -> Set JSQName -> [Export] -> Doc
- variableName :: String -> String
- isValidJSIdent :: String -> Bool
Documentation
(<+>) :: Doc -> Doc -> Doc infixr 6 Source #
Separate by space that will be removed by minify.
For non-removable space, use d <> " " <> d'
.
variableName :: String -> String 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.