TcSigs

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 Source #

Constructors

TcIdSig TcIdSigInfo |
TcPatSynSig TcPatSynInfo |

Instances

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

data TcIdSigInfo Source #

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 Source # pprPrec :: Rational -> TcIdSigInfo -> SDoc Source #

data TcIdSigInst Source #

Instances

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

data TcPatSynInfo Source #

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 Source # pprPrec :: Rational -> TcPatSynInfo -> SDoc Source #

type TcSigFun = Name -> Maybe TcSigInfo Source #

isPartialSig :: TcIdSigInst -> Bool Source #

hasCompleteSig :: TcSigFun -> Name -> Bool Source #

No signature or a partial signature

tcIdSigName :: TcIdSigInfo -> Name Source #

tcSigInfoName :: TcSigInfo -> Name Source #

completeSigPolyId_maybe :: TcSigInfo -> Maybe TcId Source #

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

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

completeSigFromId :: UserTypeCtxt -> Id -> TcIdSigInfo Source #

tcInstSig :: TcIdSigInfo -> TcM TcIdSigInst Source #

type TcPragEnv = NameEnv [LSig Name] Source #

emptyPragEnv :: TcPragEnv Source #

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

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

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

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

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

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

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