Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type HsLocalBinds id = HsLocalBindsLR id id
- data HsLocalBindsLR idL idR
- = HsValBinds (HsValBindsLR idL idR)
- | HsIPBinds (HsIPBinds idR)
- | EmptyLocalBinds
- type HsValBinds id = HsValBindsLR id id
- data HsValBindsLR idL idR
- = ValBindsIn (LHsBindsLR idL idR) [LSig idR]
- | ValBindsOut [(RecFlag, LHsBinds idL)] [LSig Name]
- type LHsBind id = LHsBindLR id id
- type LHsBinds id = LHsBindsLR id id
- type HsBind id = HsBindLR id id
- type LHsBindsLR idL idR = Bag (LHsBindLR idL idR)
- type LHsBindLR idL idR = Located (HsBindLR idL idR)
- data HsBindLR idL idR
- = FunBind { }
- | PatBind { }
- | VarBind {
- var_id :: idL
- var_rhs :: LHsExpr idR
- var_inline :: Bool
- | AbsBinds {
- abs_tvs :: [TyVar]
- abs_ev_vars :: [EvVar]
- abs_exports :: [ABExport idL]
- abs_ev_binds :: [TcEvBinds]
- abs_binds :: LHsBinds idL
- | AbsBindsSig {
- abs_tvs :: [TyVar]
- abs_ev_vars :: [EvVar]
- abs_sig_export :: idL
- abs_sig_prags :: TcSpecPrags
- abs_sig_ev_bind :: TcEvBinds
- abs_sig_bind :: LHsBind idL
- | PatSynBind (PatSynBind idL idR)
- data ABExport id = ABE {}
- data PatSynBind idL idR = PSB {}
- pprLHsBinds :: (OutputableBndr idL, OutputableBndr idR) => LHsBindsLR idL idR -> SDoc
- pprLHsBindsForUser :: (OutputableBndr idL, OutputableBndr idR, OutputableBndr id2) => LHsBindsLR idL idR -> [LSig id2] -> [SDoc]
- pprDeclList :: [SDoc] -> SDoc
- emptyLocalBinds :: HsLocalBindsLR a b
- isEmptyLocalBinds :: HsLocalBindsLR a b -> Bool
- isEmptyValBinds :: HsValBindsLR a b -> Bool
- emptyValBindsIn :: HsValBindsLR a b
- emptyValBindsOut :: HsValBindsLR a b
- emptyLHsBinds :: LHsBindsLR idL idR
- isEmptyLHsBinds :: LHsBindsLR idL idR -> Bool
- plusHsValBinds :: HsValBinds a -> HsValBinds a -> HsValBinds a
- ppr_monobind :: (OutputableBndr idL, OutputableBndr idR) => HsBindLR idL idR -> SDoc
- pprTicks :: SDoc -> SDoc -> SDoc
- data HsIPBinds id = IPBinds [LIPBind id] TcEvBinds
- isEmptyIPBinds :: HsIPBinds id -> Bool
- type LIPBind id = Located (IPBind id)
- data IPBind id = IPBind (Either (Located HsIPName) id) (LHsExpr id)
- type LSig name = Located (Sig name)
- data Sig name
- = TypeSig [Located name] (LHsSigWcType name)
- | PatSynSig (Located name) (LHsSigType name)
- | ClassOpSig Bool [Located name] (LHsSigType name)
- | IdSig Id
- | FixSig (FixitySig name)
- | InlineSig (Located name) InlinePragma
- | SpecSig (Located name) [LHsSigType name] InlinePragma
- | SpecInstSig SourceText (LHsSigType name)
- | MinimalSig SourceText (LBooleanFormula (Located name))
- type LFixitySig name = Located (FixitySig name)
- data FixitySig name = FixitySig [Located name] Fixity
- data TcSpecPrags
- type LTcSpecPrag = Located TcSpecPrag
- data TcSpecPrag = SpecPrag Id HsWrapper InlinePragma
- noSpecPrags :: TcSpecPrags
- hasSpecPrags :: TcSpecPrags -> Bool
- isDefaultMethod :: TcSpecPrags -> Bool
- isFixityLSig :: LSig name -> Bool
- isTypeLSig :: LSig name -> Bool
- isSpecLSig :: LSig name -> Bool
- isSpecInstLSig :: LSig name -> Bool
- isPragLSig :: LSig name -> Bool
- isInlineLSig :: LSig name -> Bool
- isMinimalLSig :: LSig name -> Bool
- hsSigDoc :: Sig name -> SDoc
- ppr_sig :: OutputableBndr name => Sig name -> SDoc
- pragBrackets :: SDoc -> SDoc
- pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc
- pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc
- pprTcSpecPrags :: TcSpecPrags -> SDoc
- pprMinimalSig :: OutputableBndr name => LBooleanFormula (Located name) -> SDoc
- data HsPatSynDetails a
- = InfixPatSyn a a
- | PrefixPatSyn [a]
- | RecordPatSyn [RecordPatSynField a]
- data RecordPatSynField a = RecordPatSynField {
- recordPatSynSelectorId :: a
- recordPatSynPatVar :: a
- data HsPatSynDir id
Documentation
type HsLocalBinds id = HsLocalBindsLR id id Source #
data HsLocalBindsLR idL idR Source #
Bindings in a 'let' expression or a 'where' clause
HsValBinds (HsValBindsLR idL idR) | |
HsIPBinds (HsIPBinds idR) | |
EmptyLocalBinds |
(DataId idL, DataId idR) => Data (HsLocalBindsLR idL idR) # | |
(OutputableBndr idL, OutputableBndr idR) => Outputable (HsLocalBindsLR idL idR) # | |
type HsValBinds id = HsValBindsLR id id Source #
data HsValBindsLR idL idR Source #
Value bindings (not implicit parameters) Used for both top level and nested bindings May contain pattern synonym bindings
ValBindsIn (LHsBindsLR idL idR) [LSig idR] | Before renaming RHS; idR is always RdrName Not dependency analysed Recursive by default |
ValBindsOut [(RecFlag, LHsBinds idL)] [LSig Name] | After renaming RHS; idR can be Name or Id Dependency analysed, later bindings in the list may depend on earlier ones. |
(DataId idL, DataId idR) => Data (HsValBindsLR idL idR) # | |
(OutputableBndr idL, OutputableBndr idR) => Outputable (HsValBindsLR idL idR) # | |
type LHsBinds id = LHsBindsLR id id Source #
type LHsBindsLR idL idR = Bag (LHsBindLR idL idR) Source #
data HsBindLR idL idR Source #
FunBind | FunBind is used for both functions Reason 1: Special case for type inference: see Reason 2: Instance decls can only have FunBinds, which is convenient. If you change this, you'll need to change e.g. rnMethodBinds But note that the form |
| |
PatBind | The pattern is never a simple variable; That case is done by FunBind |
| |
VarBind | Dictionary binding and suchlike. All VarBinds are introduced by the type checker |
AbsBinds | |
| |
AbsBindsSig | |
| |
PatSynBind (PatSynBind idL idR) |
|
(DataId idL, DataId idR) => Data (HsBindLR idL idR) # | |
(OutputableBndr idL, OutputableBndr idR) => Outputable (HsBindLR idL idR) # | |
Data id => Data (ABExport id) # | |
OutputableBndr id => Outputable (ABExport id) # | |
data PatSynBind idL idR Source #
AnnKeywordId
:AnnPattern
,AnnEqual
,AnnLarrow
AnnWhere
,AnnOpen
'{'
,AnnClose
'}'
,
(DataId idL, DataId idR) => Data (PatSynBind idL idR) # | |
(OutputableBndr idL, OutputableBndr idR) => Outputable (PatSynBind idL idR) # | |
pprLHsBinds :: (OutputableBndr idL, OutputableBndr idR) => LHsBindsLR idL idR -> SDoc Source #
pprLHsBindsForUser :: (OutputableBndr idL, OutputableBndr idR, OutputableBndr id2) => LHsBindsLR idL idR -> [LSig id2] -> [SDoc] Source #
pprDeclList :: [SDoc] -> SDoc Source #
emptyLocalBinds :: HsLocalBindsLR a b Source #
isEmptyLocalBinds :: HsLocalBindsLR a b -> Bool Source #
isEmptyValBinds :: HsValBindsLR a b -> Bool Source #
emptyValBindsIn :: HsValBindsLR a b Source #
emptyValBindsOut :: HsValBindsLR a b Source #
emptyLHsBinds :: LHsBindsLR idL idR Source #
isEmptyLHsBinds :: LHsBindsLR idL idR -> Bool Source #
plusHsValBinds :: HsValBinds a -> HsValBinds a -> HsValBinds a Source #
ppr_monobind :: (OutputableBndr idL, OutputableBndr idR) => HsBindLR idL idR -> SDoc Source #
DataId id => Data (HsIPBinds id) # | |
OutputableBndr id => Outputable (HsIPBinds id) # | |
isEmptyIPBinds :: HsIPBinds id -> Bool Source #
Implicit parameter bindings.
These bindings start off as (Left "x") in the parser and stay that way until after type-checking when they are replaced with (Right d), where "d" is the name of the dictionary holding the evidence for the implicit parameter.
DataId name => Data (IPBind name) # | |
OutputableBndr id => Outputable (IPBind id) # | |
Signatures and pragmas
TypeSig [Located name] (LHsSigWcType name) | An ordinary type signature f :: Num a => a -> a After renaming, this list of Names contains the named and unnamed
wildcards brought into scope by this signature. For a signature
|
PatSynSig (Located name) (LHsSigType name) | A pattern synonym type signature pattern Single :: () => (Show a) => a -> [a] |
ClassOpSig Bool [Located name] (LHsSigType name) | A signature for a class method False: ordinary class-method signature True: default class method signature e.g. class C a where op :: a -> a -- Ordinary default op :: Eq a => a -> a -- Generic default No wildcards allowed here |
IdSig Id | A type signature in generated code, notably the code generated for record selectors. We simply record the desired Id itself, replete with its name, type and IdDetails. Otherwise it's just like a type signature: there should be an accompanying binding |
FixSig (FixitySig name) | An ordinary fixity declaration infixl 8 *** |
InlineSig (Located name) InlinePragma | An inline pragma {#- INLINE f #-} |
SpecSig (Located name) [LHsSigType name] InlinePragma | A specialisation pragma {-# SPECIALISE f :: Int -> Int #-} |
SpecInstSig SourceText (LHsSigType name) | A specialisation pragma for instance declarations only {-# SPECIALISE instance Eq [Int] #-} (Class tys); should be a specialisation of the current instance declaration |
MinimalSig SourceText (LBooleanFormula (Located name)) | A minimal complete definition pragma {-# MINIMAL a | (b, c | (d | e)) #-} |
DataId name => Data (Sig name) # | |
OutputableBndr name => Outputable (Sig name) # | |
type LFixitySig name = Located (FixitySig name) Source #
Data name => Data (FixitySig name) # | |
OutputableBndr name => Outputable (FixitySig name) # | |
data TcSpecPrags Source #
TsSpecPrags conveys pragmas from the type checker to the desugarer
IsDefaultMethod | Super-specialised: a default method should be macro-expanded at every call site |
SpecPrags [LTcSpecPrag] |
type LTcSpecPrag = Located TcSpecPrag Source #
data TcSpecPrag Source #
SpecPrag Id HsWrapper InlinePragma | The Id to be specialised, an wrapper that specialises the polymorphic function, and inlining spec for the specialised function |
hasSpecPrags :: TcSpecPrags -> Bool Source #
isDefaultMethod :: TcSpecPrags -> Bool Source #
isFixityLSig :: LSig name -> Bool Source #
isTypeLSig :: LSig name -> Bool Source #
isSpecLSig :: LSig name -> Bool Source #
isSpecInstLSig :: LSig name -> Bool Source #
isPragLSig :: LSig name -> Bool Source #
isInlineLSig :: LSig name -> Bool Source #
isMinimalLSig :: LSig name -> Bool Source #
pragBrackets :: SDoc -> SDoc Source #
pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc Source #
pprTcSpecPrags :: TcSpecPrags -> SDoc Source #
pprMinimalSig :: OutputableBndr name => LBooleanFormula (Located name) -> SDoc Source #
data HsPatSynDetails a Source #
InfixPatSyn a a | |
PrefixPatSyn [a] | |
RecordPatSyn [RecordPatSynField a] |
data RecordPatSynField a Source #
data HsPatSynDir id Source #
DataId id => Data (HsPatSynDir id) # | |