ghc-9.6.3: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Tc.Gen.Pat

Description

Typechecking patterns

Synopsis

- tcLetPat :: (Name -> Maybe TcId) -> LetBndrSpec -> LPat GhcRn -> Scaled ExpSigmaTypeFRR -> TcM a -> TcM (LPat GhcTc, a)
- newLetBndr :: LetBndrSpec -> Name -> Mult -> TcType -> TcM TcId
- data LetBndrSpec
  - = LetLclBndr
  - | LetGblBndr TcPragEnv
- tcCheckPat :: HsMatchContext GhcTc -> LPat GhcRn -> Scaled TcSigmaTypeFRR -> TcM a -> TcM (LPat GhcTc, a)
- tcCheckPat_O :: HsMatchContext GhcTc -> CtOrigin -> LPat GhcRn -> Scaled TcSigmaTypeFRR -> TcM a -> TcM (LPat GhcTc, a)
- tcInferPat :: FixedRuntimeRepContext -> HsMatchContext GhcTc -> LPat GhcRn -> TcM a -> TcM ((LPat GhcTc, a), TcSigmaTypeFRR)
- tcPats :: HsMatchContext GhcTc -> [LPat GhcRn] -> [Scaled ExpSigmaTypeFRR] -> TcM a -> TcM ([LPat GhcTc], a)
- addDataConStupidTheta :: DataCon -> [TcType] -> TcM ()

# Documentation

tcLetPat :: (Name -> Maybe TcId) -> LetBndrSpec -> LPat GhcRn -> Scaled ExpSigmaTypeFRR -> TcM a -> TcM (LPat GhcTc, a) Source #

newLetBndr :: LetBndrSpec -> Name -> Mult -> TcType -> TcM TcId Source #

data LetBndrSpec Source #

Constructors

LetLclBndr |
LetGblBndr TcPragEnv |

#### Instances

Instances details

Outputable LetBndrSpec Source # |
Instance details Defined in GHC.Tc.Gen.Pat Methods ppr :: LetBndrSpec -> SDoc Source #

tcCheckPat :: HsMatchContext GhcTc -> LPat GhcRn -> Scaled TcSigmaTypeFRR -> TcM a -> TcM (LPat GhcTc, a) Source #

tcCheckPat_O Source #

Arguments

:: HsMatchContext GhcTc |
-> CtOrigin | origin to use if the type needs inst'ing
-> LPat GhcRn |
-> Scaled TcSigmaTypeFRR |
-> TcM a |
-> TcM (LPat GhcTc, a) |

A variant of `tcPat` that takes a custom origin

tcInferPat :: FixedRuntimeRepContext -> HsMatchContext GhcTc -> LPat GhcRn -> TcM a -> TcM ((LPat GhcTc, a), TcSigmaTypeFRR) Source #

tcPats Source #

Arguments

:: HsMatchContext GhcTc |
-> [LPat GhcRn] | atterns
-> [Scaled ExpSigmaTypeFRR] | types of the patterns
-> TcM a | checker for the body
-> TcM ([LPat GhcTc], a) |

addDataConStupidTheta :: DataCon -> [TcType] -> TcM () Source #