Agda-2.6.0.1: A dependently typed functional programming language and proof assistant

Safe Haskell | None
Language | Haskell2010

Agda.Compiler.JS.Pretty

Synopsis

- br :: Int -> String
- unescape :: Char -> String
- unescapes :: String -> String
- class Pretty a where
  - pretty :: Nat -> Int -> a -> String
- class Pretties a where
  - pretties :: Nat -> Int -> a -> [String]
- block :: Nat -> Int -> Exp -> String
- block' :: Nat -> Int -> Exp -> String
- modname :: GlobalId -> String
- exports :: Nat -> Int -> Set [MemberId] -> [Export] -> String
- variableName :: String -> String
- isValidJSIdent :: String -> Bool

# Documentation

br :: Int -> String Source #

unescape :: Char -> String Source #

unescapes :: String -> String Source #

class Pretty a where Source #

Methods

pretty :: Nat -> Int -> a -> String Source #

Instances

Pretty Module Source # |
Instance details Defined in Agda.Compiler.JS.Pretty Methods pretty :: Nat -> Int -> Module -> String Source #
Pretty MemberId Source # |
Instance details Defined in Agda.Compiler.JS.Pretty Methods pretty :: Nat -> Int -> MemberId -> String Source #
Pretty GlobalId Source # |
Instance details Defined in Agda.Compiler.JS.Pretty Methods pretty :: Nat -> Int -> GlobalId -> String Source #
Pretty LocalId Source # |
Instance details Defined in Agda.Compiler.JS.Pretty Methods pretty :: Nat -> Int -> LocalId -> String Source #
Pretty Exp Source # |
Instance details Defined in Agda.Compiler.JS.Pretty Methods pretty :: Nat -> Int -> Exp -> String Source #
(Pretty a, Pretty b) => Pretty (a, b) Source # |
Instance details Defined in Agda.Compiler.JS.Pretty Methods pretty :: Nat -> Int -> (a, b) -> String Source #

class Pretties a where Source #

Methods

pretties :: Nat -> Int -> a -> [String] Source #

Instances

Pretty a => Pretties [a] Source # |
Instance details Defined in Agda.Compiler.JS.Pretty Methods pretties :: Nat -> Int -> [a] -> [String] Source #
(Pretty a, Pretty b) => Pretties (Map a b) Source # |
Instance details Defined in Agda.Compiler.JS.Pretty Methods pretties :: Nat -> Int -> Map a b -> [String] Source #

block :: Nat -> Int -> Exp -> String Source #

block' :: Nat -> Int -> Exp -> String Source #

modname :: GlobalId -> String Source #

exports :: Nat -> Int -> Set [MemberId] -> [Export] -> String Source #

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.