JavaScript statements, see the ECMA262 Reference for details
Constructors
DeclStat !Ident !(Maybe JStgExpr)Variable declarations: var foo [= e]
ReturnStat JStgExprReturn
IfStat JStgExpr JStgStat JStgStatIf
WhileStat Bool JStgExpr JStgStatWhile, bool is "do" when True
ForStat JStgStat JStgExpr JStgStat JStgStatFor
ForInStat Bool Ident JStgExpr JStgStatFor-in, bool is "each' when True
SwitchStat JStgExpr [(JStgExpr, JStgStat)] JStgStatSwitch
TryStat JStgStat Ident JStgStat JStgStatTry
BlockStat [JStgStat]Blocks
ApplStat JStgExpr [JStgExpr]Application
UOpStat UOp JStgExprUnary operators
AssignStat JStgExpr AOp JStgExprBinding form:
foo = barLabelStat JsLabel JStgStatStatement Labels, makes me nostalgic for qbasic
BreakStat (Maybe JsLabel)Break
ContinueStat (Maybe JsLabel)Continue
FuncStat !Ident [Ident] JStgStatan explicit function definition
Instances7Eq, Generic, Semigroup, Monoid, ToStat, Rep, …
Eq JStgStatDefined in ghc-9.10.3 · GHC.JS.JStg.SyntaxGeneric JStgStatDefined in ghc-9.10.3 · GHC.JS.JStg.SyntaxSemigroup JStgStatDefined in ghc-9.10.3 · GHC.JS.JStg.SyntaxMonoid JStgStatDefined in ghc-9.10.3 · GHC.JS.JStg.SyntaxToStat JStgStatDefined in ghc-9.10.3 · GHC.JS.MakeToStat [JStgStat]Defined in ghc-9.10.3 · GHC.JS.Maketype Rep JStgStat = D1 ('MetaDataDefined in ghc-9.10.3 · GHC.JS.JStg.Syntax"JStgStat"
"GHC.JS.JStg.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 JStgExpr))) :+: C1 ('MetaCons"ReturnStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgExpr))) :+: (C1 ('MetaCons"IfStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgExpr) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgStat) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgStat))) :+: C1 ('MetaCons"WhileStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgExpr) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgStat))))) :+: ((C1 ('MetaCons"ForStat"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgStat) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgExpr)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgStat) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgStat))) :+: 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 JStgExpr) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgStat)))) :+: (C1 ('MetaCons"SwitchStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgExpr) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(JStgExpr, JStgStat)]) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgStat))) :+: C1 ('MetaCons"TryStat"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgStat) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgStat) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgStat)))))) :+: (((C1 ('MetaCons"BlockStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [JStgStat])) :+: C1 ('MetaCons"ApplStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgExpr) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [JStgExpr]))) :+: (C1 ('MetaCons"UOpStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UOp) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgExpr)) :+: C1 ('MetaCons"AssignStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgExpr) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AOp) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgExpr))))) :+: ((C1 ('MetaCons"LabelStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JsLabel) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JStgStat)) :+: C1 ('MetaCons"BreakStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe JsLabel)))) :+: (C1 ('MetaCons"ContinueStat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe JsLabel))) :+: 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 JStgStat)))))))