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
- optJSModuleStyle :: JSModuleStyle
- defaultJSOptions :: JSOptions
- jsCommandLineFlags :: [OptDescr (Flag JSOptions)]
- jsPreCompile :: JSOptions -> TCM JSOptions
- jsPostCompile :: JSOptions -> IsMain -> Map TopLevelModuleName Module -> TCM ()
- data JSModuleEnv = JSModuleEnv {
- jsCoinductionKit :: Maybe CoinductionKit
- jsCompile :: Bool
- 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 :: 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
- litmeta :: MetaId -> Exp
- writeModule :: Bool -> JSModuleStyle -> Module -> TCM ()
- outFile :: GlobalId -> TCM FilePath
- outFile_ :: TCM FilePath
- primitives :: Set PrimitiveId
Documentation
JSOptions | |
|
Instances
NFData JSOptions Source # | |||||
Defined in Agda.Compiler.JS.Compiler | |||||
Generic 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.20240731-inplace" '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) :*: S1 ('MetaSel ('Just "optJSModuleStyle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JSModuleStyle))))) |
jsPostCompile :: JSOptions -> IsMain -> Map TopLevelModuleName Module -> TCM () Source #
After all modules have been compiled, copy RTE modules and verify compiled modules.
data JSModuleEnv Source #
JSModuleEnv | |
|
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 :: 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.
defJSDef :: Definition -> Maybe String Source #
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 #
eraseLocalVars :: [Bool] -> TTerm -> TTerm Source #
writeModule :: Bool -> JSModuleStyle -> Module -> TCM () Source #
primitives :: Set PrimitiveId Source #
Orphan instances
NFData JSModuleStyle Source # | |
rnf :: JSModuleStyle -> () |