JavaScript statements, see the ECMA262 Reference for details
Constructors
DeclStat !Ident !(Maybe JExpr)Variable declarations: var foo [= e]
ReturnStat JExprReturn
IfStat JExpr JStat JStatIf
WhileStat Bool JExpr JStatWhile, bool is "do" when True
ForStat JStat JExpr JStat JStatFor
ForInStat Bool Ident JExpr JStatFor-in, bool is "each' when True
SwitchStat JExpr [(JExpr, JStat)] JStatSwitch
TryStat JStat Ident JStat JStatTry
BlockStat [JStat]Blocks
ApplStat JExpr [JExpr]Application
UOpStat UOp JExprUnary operators
AssignStat JExpr AOp JExprLabelStat JLabel JStatStatement Labels, makes me nostalgic for qbasic
BreakStat (Maybe JLabel)Break
ContinueStat (Maybe JLabel)Continue
FuncStat !Ident [Ident] JStatan explicit function definition
Instances8Eq, Generic, Semigroup, Monoid, Binary, JsToDoc, …
Eq JStatDefined in ghc-9.10.3 · GHC.JS.SyntaxGeneric JStatDefined in ghc-9.10.3 · GHC.JS.SyntaxSemigroup JStatDefined in ghc-9.10.3 · GHC.JS.SyntaxMonoid JStatDefined in ghc-9.10.3 · GHC.JS.SyntaxBinary JStatDefined in ghc-9.10.3 · GHC.StgToJS.Object · orphanJsToDoc JStatDefined in ghc-9.10.3 · GHC.JS.PprJsToDoc [JStat]Defined in ghc-9.10.3 · GHC.JS.Pprtype Rep JStat = D1 ('MetaDataDefined in ghc-9.10.3 · GHC.JS.Syntax"JStat"
"GHC.JS.Syntax"
"ghc-9.10.3-cff4"
'False) ((((C1 ('MetaCons"DeclStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Ident) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe JExpr))) :+: C1 ('MetaCons"ReturnStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr))) :+: (C1 ('MetaCons"IfStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStat) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStat))) :+: C1 ('MetaCons"WhileStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStat))))) :+: ((C1 ('MetaCons"ForStat"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStat) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStat) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStat))) :+: C1 ('MetaCons"ForInStat"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStat)))) :+: (C1 ('MetaCons"SwitchStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(JExpr, JStat)]) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStat))) :+: C1 ('MetaCons"TryStat"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStat) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStat) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStat)))))) :+: (((C1 ('MetaCons"BlockStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [JStat])) :+: C1 ('MetaCons"ApplStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [JExpr]))) :+: (C1 ('MetaCons"UOpStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UOp) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr)) :+: C1 ('MetaCons"AssignStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AOp) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JExpr))))) :+: ((C1 ('MetaCons"LabelStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JLabel) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStat)) :+: C1 ('MetaCons"BreakStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe JLabel)))) :+: (C1 ('MetaCons"ContinueStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe JLabel))) :+: C1 ('MetaCons"FuncStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Ident) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Ident]) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStat)))))))