| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Agda.Compiler.JS.Compiler
Contents
Description
Main module for JS backend.
Synopsis
- jsBackend :: Backend
 - jsBackend' :: Backend' JSOptions JSOptions JSModuleEnv Module (Maybe Export)
 - data JSOptions = JSOptions {}
 - defaultJSOptions :: JSOptions
 - jsCommandLineFlags :: [OptDescr (Flag JSOptions)]
 - jsPreCompile :: JSOptions -> TCM JSOptions
 - jsPostCompile :: JSOptions -> IsMain -> Map TopLevelModuleName Module -> TCM ()
 - data JSModuleEnv = JSModuleEnv {}
 - jsPreModule :: JSOptions -> IsMain -> TopLevelModuleName -> Maybe FilePath -> TCM (Recompile JSModuleEnv Module)
 - jsPostModule :: JSOptions -> JSModuleEnv -> IsMain -> TopLevelModuleName -> [Maybe Export] -> TCM Module
 - jsCompileDef :: JSOptions -> JSModuleEnv -> IsMain -> Definition -> TCM (Maybe Export)
 - prefix :: [Char]
 - jsMod :: TopLevelModuleName -> GlobalId
 - jsFileName :: JSModuleStyle -> GlobalId -> String
 - jsMember :: Name -> MemberId
 - global' :: QName -> TCM (Exp, JSQName)
 - global :: QName -> TCM (Exp, JSQName)
 - reorder :: [Export] -> [Export]
 - reorder' :: Set JSQName -> [Export] -> [Export]
 - isTopLevelValue :: Export -> Bool
 - isEmptyObject :: Export -> Bool
 - insertAfter :: Set JSQName -> Export -> [Export] -> [Export]
 - type EnvWithOpts = (JSOptions, JSModuleEnv)
 - definition :: EnvWithOpts -> (QName, Definition) -> TCM (Maybe Export)
 - checkCompilerPragmas :: QName -> TCM ()
 - defJSDef :: Definition -> Maybe String
 - definition' :: EnvWithOpts -> QName -> Definition -> Type -> JSQName -> TCM (Maybe Export)
 - compileTerm :: EnvWithOpts -> TTerm -> TCM Exp
 - compilePrim :: TPrim -> Exp
 - compileAlt :: EnvWithOpts -> TAlt -> TCM (MemberId, Exp)
 - visitorName :: QName -> TCM MemberId
 - flatName :: MemberId
 - local :: Nat -> Exp
 - qname :: QName -> TCM Exp
 - literal :: Literal -> Exp
 - litqname :: QName -> Exp
 - litmeta :: MetaId -> Exp
 - writeModule :: Bool -> JSModuleStyle -> Module -> TCM ()
 - outFile :: JSModuleStyle -> GlobalId -> TCM FilePath
 - primitives :: Set PrimitiveId
 
Documentation
Constructors
| JSOptions | |
Fields 
  | |
Instances
jsPostCompile :: JSOptions -> IsMain -> Map TopLevelModuleName Module -> TCM () Source #
After all modules have been compiled, copy RTE modules and verify compiled modules.
data JSModuleEnv Source #
Constructors
| JSModuleEnv | |
Fields 
  | |
jsPreModule :: JSOptions -> IsMain -> TopLevelModuleName -> Maybe FilePath -> TCM (Recompile JSModuleEnv Module) Source #
jsPostModule :: JSOptions -> JSModuleEnv -> IsMain -> TopLevelModuleName -> [Maybe Export] -> TCM Module Source #
jsCompileDef :: JSOptions -> JSModuleEnv -> IsMain -> Definition -> TCM (Maybe Export) Source #
jsMod :: TopLevelModuleName -> GlobalId Source #
jsFileName :: JSModuleStyle -> GlobalId -> String Source #
isTopLevelValue :: Export -> Bool Source #
isEmptyObject :: Export -> Bool Source #
type EnvWithOpts = (JSOptions, JSModuleEnv) Source #
definition :: EnvWithOpts -> (QName, Definition) -> TCM (Maybe Export) Source #
checkCompilerPragmas :: QName -> TCM () Source #
Ensure that there is at most one pragma for a name.
definition' :: EnvWithOpts -> QName -> Definition -> Type -> JSQName -> TCM (Maybe Export) Source #
compileTerm :: EnvWithOpts -> TTerm -> TCM Exp Source #
compilePrim :: TPrim -> Exp Source #
compileAlt :: EnvWithOpts -> TAlt -> TCM (MemberId, Exp) Source #
writeModule :: Bool -> JSModuleStyle -> Module -> TCM () Source #
Orphan instances
| NFData JSModuleStyle Source # | |
Methods rnf :: JSModuleStyle -> () #  | |