TcPat

ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

TcPat

Synopsis

- tcLetPat :: (Name -> Maybe TcId) -> LetBndrSpec -> LPat Name -> ExpSigmaType -> TcM a -> TcM (LPat TcId, a)
- newLetBndr :: LetBndrSpec -> Name -> TcType -> TcM TcId
- data LetBndrSpec
  - = LetLclBndr
  - | LetGblBndr TcPragEnv
- tcPat :: HsMatchContext Name -> LPat Name -> ExpSigmaType -> TcM a -> TcM (LPat TcId, a)
- tcPat_O :: HsMatchContext Name -> CtOrigin -> LPat Name -> ExpSigmaType -> TcM a -> TcM (LPat TcId, a)
- tcPats :: HsMatchContext Name -> [LPat Name] -> [ExpSigmaType] -> TcM a -> TcM ([LPat TcId], a)
- addDataConStupidTheta :: DataCon -> [TcType] -> TcM ()
- badFieldCon :: ConLike -> FieldLabelString -> SDoc
- polyPatSig :: TcType -> SDoc

# Documentation

tcLetPat :: (Name -> Maybe TcId) -> LetBndrSpec -> LPat Name -> ExpSigmaType -> TcM a -> TcM (LPat TcId, a) Source #

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

data LetBndrSpec Source #

Constructors

LetLclBndr |
LetGblBndr TcPragEnv |

Instances

Outputable LetBndrSpec # |
Methods ppr :: LetBndrSpec -> SDoc Source # pprPrec :: Rational -> LetBndrSpec -> SDoc Source #

tcPat :: HsMatchContext Name -> LPat Name -> ExpSigmaType -> TcM a -> TcM (LPat TcId, a) Source #

tcPat_O Source #

Arguments

:: HsMatchContext Name |
-> CtOrigin | origin to use if the type needs inst'ing
-> LPat Name |
-> ExpSigmaType |
-> TcM a |
-> TcM (LPat TcId, a) |

A variant of `tcPat` that takes a custom origin

tcPats :: HsMatchContext Name -> [LPat Name] -> [ExpSigmaType] -> TcM a -> TcM ([LPat TcId], a) Source #

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

badFieldCon :: ConLike -> FieldLabelString -> SDoc Source #

polyPatSig :: TcType -> SDoc Source #