TcSigs

ghc-8.10.1: 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 GhcRn
    - 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 GhcRn] -> TcM ([TcId], TcSigFun)
- tcUserTypeSig :: SrcSpan -> LHsSigWcType GhcRn -> Maybe Name -> TcM TcIdSigInfo
- completeSigFromId :: UserTypeCtxt -> Id -> TcIdSigInfo
- tcInstSig :: TcIdSigInfo -> TcM TcIdSigInst
- type TcPragEnv = NameEnv [LSig GhcRn]
- emptyPragEnv :: TcPragEnv
- lookupPragEnv :: TcPragEnv -> Name -> [LSig GhcRn]
- extendPragEnv :: TcPragEnv -> (Name, LSig GhcRn) -> TcPragEnv
- mkPragEnv :: [LSig GhcRn] -> LHsBinds GhcRn -> TcPragEnv
- tcSpecPrags :: Id -> [LSig GhcRn] -> TcM [LTcSpecPrag]
- tcSpecWrapper :: UserTypeCtxt -> TcType -> TcType -> TcM HsWrapper
- tcImpPrags :: [LSig GhcRn] -> TcM [LTcSpecPrag]
- addInlinePrags :: TcId -> [LSig GhcRn] -> TcM TcId

# Documentation

data TcSigInfo #

Constructors

TcIdSig TcIdSigInfo |
TcPatSynSig TcPatSynInfo |

#### Instances

Instances details

Outputable TcSigInfo # |
Instance details Defined in TcRnTypes 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 GhcRn sig_ctxt :: UserTypeCtxt sig_loc :: SrcSpan

#### Instances

Instances details

Outputable TcIdSigInfo # |
Instance details Defined in TcRnTypes Methods ppr :: TcIdSigInfo -> SDoc # pprPrec :: Rational -> TcIdSigInfo -> SDoc #

data TcIdSigInst #

#### Instances

Instances details

Outputable TcIdSigInst # |
Instance details Defined in TcRnTypes 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

Instances details

Outputable TcPatSynInfo # |
Instance details Defined in TcRnTypes 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 GhcRn] -> TcM ([TcId], TcSigFun) #

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

completeSigFromId :: UserTypeCtxt -> Id -> TcIdSigInfo #

tcInstSig :: TcIdSigInfo -> TcM TcIdSigInst #

type TcPragEnv = NameEnv [LSig GhcRn] #

emptyPragEnv :: TcPragEnv #

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

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

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

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

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

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

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