Safe Haskell | None |
---|---|
Language | Haskell2010 |
Main module for JS backend.
Synopsis
- jsBackend :: Backend
- jsBackend' :: Backend' JSOptions JSOptions JSModuleEnv Module (Maybe Export)
- data JSOptions = JSOptions {
- optJSCompile :: Bool
- optJSOptimize :: Bool
- optJSMinify :: Bool
- optJSVerify :: Bool
- defaultJSOptions :: JSOptions
- jsCommandLineFlags :: [OptDescr (Flag JSOptions)]
- jsPreCompile :: JSOptions -> TCM JSOptions
- jsPostCompile :: JSOptions -> IsMain -> Map ModuleName Module -> TCM ()
- mergeModules :: Map ModuleName Module -> [(GlobalId, Export)]
- data JSModuleEnv = JSModuleEnv {}
- jsPreModule :: JSOptions -> IsMain -> ModuleName -> Maybe FilePath -> TCM (Recompile JSModuleEnv Module)
- jsPostModule :: JSOptions -> JSModuleEnv -> IsMain -> ModuleName -> [Maybe Export] -> TCM Module
- jsCompileDef :: JSOptions -> JSModuleEnv -> IsMain -> Definition -> TCM (Maybe Export)
- prefix :: [Char]
- jsMod :: ModuleName -> GlobalId
- jsFileName :: 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 ((QName, MemberId), Exp)
- eraseLocalVars :: [Bool] -> TTerm -> TTerm
- visitorName :: QName -> TCM MemberId
- flatName :: MemberId
- local :: Nat -> Exp
- qname :: QName -> TCM Exp
- literal :: Literal -> Exp
- litqname :: QName -> Exp
- writeModule :: Bool -> Module -> TCM ()
- outFile :: GlobalId -> TCM FilePath
- outFile_ :: TCM FilePath
- primitives :: Set String
Documentation
JSOptions | |
|
Instances
Generic JSOptions Source # | |
NFData JSOptions Source # | |
Defined in Agda.Compiler.JS.Compiler | |
type Rep JSOptions Source # | |
Defined in Agda.Compiler.JS.Compiler type Rep JSOptions = D1 ('MetaData "JSOptions" "Agda.Compiler.JS.Compiler" "Agda-2.6.2.2-DXbLWdCWC6QEApzM0094If" 'False) (C1 ('MetaCons "JSOptions" 'PrefixI 'True) ((S1 ('MetaSel ('Just "optJSCompile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "optJSOptimize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "optJSMinify") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "optJSVerify") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) |
jsPostCompile :: JSOptions -> IsMain -> Map ModuleName Module -> TCM () Source #
After all modules have been compiled, copy RTE modules and verify compiled modules.
mergeModules :: Map ModuleName Module -> [(GlobalId, Export)] Source #
data JSModuleEnv Source #
JSModuleEnv | |
|
jsPreModule :: JSOptions -> IsMain -> ModuleName -> Maybe FilePath -> TCM (Recompile JSModuleEnv Module) Source #
jsPostModule :: JSOptions -> JSModuleEnv -> IsMain -> ModuleName -> [Maybe Export] -> TCM Module Source #
jsCompileDef :: JSOptions -> JSModuleEnv -> IsMain -> Definition -> TCM (Maybe Export) Source #
jsMod :: ModuleName -> GlobalId Source #
jsFileName :: 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 ((QName, MemberId), Exp) Source #
primitives :: Set String Source #