ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

TcSigs

Synopsis

- data TcSigInfo
  - = TcIdSig TcIdSigInfo
  - | TcPatSynSig TcPatSynInfo
- data TcIdSigInfo
  - = CompleteSig {
    - sig_bndr :: TcId
    - sig_ctxt :: UserTypeCtxt
    - sig_loc :: SrcSpan
    }
  - | PartialSig {
    - psig_name :: Name
    - psig_hs_ty :: LHsSigWcType Name
    - sig_ctxt :: UserTypeCtxt
    - sig_loc :: SrcSpan
    }
- data TcIdSigInst
- data TcPatSynInfo = TPSI {
  - patsig_name :: Name
  - patsig_implicit_bndrs :: [TyVarBinder]
  - patsig_univ_bndrs :: [TyVar]
  - patsig_req :: TcThetaType
  - patsig_ex_bndrs :: [TyVar]
  - patsig_prov :: TcThetaType
  - patsig_body_ty :: TcSigmaType
  }
- type TcSigFun = Name -> Maybe TcSigInfo
- isPartialSig :: TcIdSigInst -> Bool
- hasCompleteSig :: TcSigFun -> Name -> Bool
- tcIdSigName :: TcIdSigInfo -> Name
- tcSigInfoName :: TcSigInfo -> Name
- completeSigPolyId_maybe :: TcSigInfo -> Maybe TcId
- tcTySigs :: [LSig Name] -> TcM ([TcId], TcSigFun)
- tcUserTypeSig :: SrcSpan -> LHsSigWcType Name -> Maybe Name -> TcM TcIdSigInfo
- completeSigFromId :: UserTypeCtxt -> Id -> TcIdSigInfo
- tcInstSig :: TcIdSigInfo -> TcM TcIdSigInst
- type TcPragEnv = NameEnv [LSig Name]
- emptyPragEnv :: TcPragEnv
- lookupPragEnv :: TcPragEnv -> Name -> [LSig Name]
- extendPragEnv :: TcPragEnv -> (Name, LSig Name) -> TcPragEnv
- mkPragEnv :: [LSig Name] -> LHsBinds Name -> TcPragEnv
- tcSpecPrags :: Id -> [LSig Name] -> TcM [LTcSpecPrag]
- tcSpecWrapper :: UserTypeCtxt -> TcType -> TcType -> TcM HsWrapper
- tcImpPrags :: [LSig Name] -> TcM [LTcSpecPrag]
- addInlinePrags :: TcId -> [LSig Name] -> TcM TcId

# Documentation

data TcSigInfo #

Constructors

TcIdSig TcIdSigInfo |
TcPatSynSig TcPatSynInfo |

Instances

Outputable TcSigInfo # |
Methods ppr :: TcSigInfo -> SDoc # pprPrec :: Rational -> TcSigInfo -> SDoc #

data TcIdSigInfo #

Constructors

CompleteSig |

Fields

- sig_bndr :: TcId
- sig_ctxt :: UserTypeCtxt
- sig_loc :: SrcSpan

PartialSig |

Fields

- psig_name :: Name
- psig_hs_ty :: LHsSigWcType Name
- sig_ctxt :: UserTypeCtxt
- sig_loc :: SrcSpan

Instances

Outputable TcIdSigInfo # |
Methods ppr :: TcIdSigInfo -> SDoc # pprPrec :: Rational -> TcIdSigInfo -> SDoc #

data TcIdSigInst #

Instances

Outputable TcIdSigInst # |
Methods ppr :: TcIdSigInst -> SDoc # pprPrec :: Rational -> TcIdSigInst -> SDoc #

data TcPatSynInfo #

Constructors

TPSI |

Fields

- patsig_name :: Name
- patsig_implicit_bndrs :: [TyVarBinder]
- patsig_univ_bndrs :: [TyVar]
- patsig_req :: TcThetaType
- patsig_ex_bndrs :: [TyVar]
- patsig_prov :: TcThetaType
- patsig_body_ty :: TcSigmaType

Instances

Outputable TcPatSynInfo # |
Methods ppr :: TcPatSynInfo -> SDoc # pprPrec :: Rational -> TcPatSynInfo -> SDoc #

type TcSigFun = Name -> Maybe TcSigInfo #

isPartialSig :: TcIdSigInst -> Bool #

hasCompleteSig :: TcSigFun -> Name -> Bool #

No signature or a partial signature

tcIdSigName :: TcIdSigInfo -> Name #

tcSigInfoName :: TcSigInfo -> Name #

completeSigPolyId_maybe :: TcSigInfo -> Maybe TcId #

tcTySigs :: [LSig Name] -> TcM ([TcId], TcSigFun) #

tcUserTypeSig :: SrcSpan -> LHsSigWcType Name -> Maybe Name -> TcM TcIdSigInfo #

completeSigFromId :: UserTypeCtxt -> Id -> TcIdSigInfo #

tcInstSig :: TcIdSigInfo -> TcM TcIdSigInst #

type TcPragEnv = NameEnv [LSig Name] #

emptyPragEnv :: TcPragEnv #

lookupPragEnv :: TcPragEnv -> Name -> [LSig Name] #

extendPragEnv :: TcPragEnv -> (Name, LSig Name) -> TcPragEnv #

mkPragEnv :: [LSig Name] -> LHsBinds Name -> TcPragEnv #

tcSpecPrags :: Id -> [LSig Name] -> TcM [LTcSpecPrag] #

tcSpecWrapper :: UserTypeCtxt -> TcType -> TcType -> TcM HsWrapper #

tcImpPrags :: [LSig Name] -> TcM [LTcSpecPrag] #

addInlinePrags :: TcId -> [LSig Name] -> TcM TcId #