Corresponds to TH's Exp type. Note that DLamE takes names, not patterns.
Constructors
DVarE NameDConE NameDLitE LitDAppE DExp DExpDAppTypeE DExp DTypeDLamCasesE [DClause]A
\casesexpression. In the spirit of making DExp minimal,th-desugarwill desugar lambda expressions,caseexpressions,\caseexpressions, and\casesexpressions to DLamCasesE. (See also the dLamE, dCaseE, and dLamCaseE functions for constructing these expressions in terms of DLamCasesE.)A DLamCasesE value should obey the following invariants:
Each DClause should have exactly the same number of visible arguments in its list of DPats.
If the list of DClauses is empty, then the overall expression should have exactly one argument. Note that this is a difference in behavior from how
\casesexpressions work, as\casesis required to have at least one clause. For this reason,th-desugarwill sweetenDLamCasesE []to\case{}.
DLetE [DLetDec] DExpDSigE DExp DTypeDStaticE DExpDTypedBracketE DExpDTypedSpliceE DExpDTypeE DTypeDForallE DForallTelescope DExpDConstrainedE [DExp] DExp
Instances7Eq, Data, Show, Generic, Lift, Desugar, …
Eq DExpDefined in th-desugar-1.19 · Language.Haskell.TH.Desugar.ASTData DExpDefined in th-desugar-1.19 · Language.Haskell.TH.Desugar.ASTShow DExpDefined in th-desugar-1.19 · Language.Haskell.TH.Desugar.ASTGeneric DExpDefined in th-desugar-1.19 · Language.Haskell.TH.Desugar.ASTLift DExpDefined in th-desugar-1.19 · Language.Haskell.TH.Desugar.ASTDesugar Exp DExpDefined in th-desugar-1.19 · Language.Haskell.TH.Desugartype Rep DExp = D1 ('MetaDataDefined in th-desugar-1.19 · Language.Haskell.TH.Desugar.AST"DExp"
"Language.Haskell.TH.Desugar.AST"
"th-desugar-1.19-D0kikNU5MCfJX6dSXwNgHw"
'False) (((C1 ('MetaCons"DVarE"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: (C1 ('MetaCons"DConE"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons"DLitE"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Lit)))) :+: ((C1 ('MetaCons"DAppE"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp)) :+: C1 ('MetaCons"DAppTypeE"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType))) :+: (C1 ('MetaCons"DLamCasesE"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DClause])) :+: C1 ('MetaCons"DLetE"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DLetDec]) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp))))) :+: ((C1 ('MetaCons"DSigE"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)) :+: (C1 ('MetaCons"DStaticE"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp)) :+: C1 ('MetaCons"DTypedBracketE"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp)))) :+: ((C1 ('MetaCons"DTypedSpliceE"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp)) :+: C1 ('MetaCons"DTypeE"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType))) :+: (C1 ('MetaCons"DForallE"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DForallTelescope) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp)) :+: C1 ('MetaCons"DConstrainedE"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DExp]) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp))))))