ghc-7.10.3: The GHC API

Safe Haskell | None
Language | Haskell2010

TcHsType

Synopsis

- tcHsSigType :: UserTypeCtxt -> LHsType Name -> TcM Type
- tcHsSigTypeNC :: UserTypeCtxt -> LHsType Name -> TcM Type
- tcHsDeriv :: HsType Name -> TcM ([TyVar], Class, [Type], Kind)
- tcHsVectInst :: LHsType Name -> TcM (Class, [Type])
- tcHsInstHead :: UserTypeCtxt -> LHsType Name -> TcM ([TyVar], ThetaType, Class, [Type])
- data UserTypeCtxt
  - = FunSigCtxt Name
  - | InfSigCtxt Name
  - | ExprSigCtxt
  - | ConArgCtxt Name
  - | TySynCtxt Name
  - | PatSigCtxt
  - | RuleSigCtxt Name
  - | ResSigCtxt
  - | ForSigCtxt Name
  - | DefaultDeclCtxt
  - | InstDeclCtxt
  - | SpecInstCtxt
  - | ThBrackCtxt
  - | GenSigCtxt
  - | GhciCtxt
  - | ClassSCCtxt Name
  - | SigmaCtxt
  - | DataTyCtxt Name
- kcLookupKind :: Name -> TcM Kind
- kcTyClTyVars :: Name -> LHsTyVarBndrs Name -> TcM a -> TcM a
- tcTyClTyVars :: Name -> LHsTyVarBndrs Name -> ([TyVar] -> Kind -> TcM a) -> TcM a
- tcHsConArgType :: NewOrData -> LHsType Name -> TcM Type
- tcDataKindSig :: Kind -> TcM [TyVar]
- tcClassSigType :: LHsType Name -> TcM Type
- kcHsTyVarBndrs :: Bool -> LHsTyVarBndrs Name -> TcM (Kind, r) -> TcM (Kind, r)
- tcHsTyVarBndrs :: LHsTyVarBndrs Name -> ([TcTyVar] -> TcM r) -> TcM r
- tcHsLiftedType :: LHsType Name -> TcM TcType
- tcHsOpenType :: LHsType Name -> TcM TcType
- tcLHsType :: LHsType Name -> TcM (TcType, TcKind)
- tcCheckLHsType :: LHsType Name -> Kind -> TcM Type
- tcHsContext :: LHsContext Name -> TcM [PredType]
- tcInferApps :: Outputable a => a -> TcKind -> [LHsType Name] -> TcM ([TcType], TcKind)
- tcHsArgTys :: SDoc -> [LHsType Name] -> [Kind] -> TcM [TcType]
- kindGeneralize :: TyVarSet -> TcM [KindVar]
- checkKind :: TcKind -> TcKind -> TcM ()
- tcLHsKind :: LHsKind Name -> TcM Kind
- tcHsPatSigType :: UserTypeCtxt -> HsWithBndrs Name (LHsType Name) -> TcM (Type, [(Name, TcTyVar)], [(Name, TcTyVar)])
- tcPatSig :: Bool -> HsWithBndrs Name (LHsType Name) -> TcSigmaType -> TcM (TcType, [(Name, TcTyVar)], [(Name, TcTyVar)], HsWrapper)

# Documentation

tcHsSigType :: UserTypeCtxt -> LHsType Name -> TcM Type

tcHsSigTypeNC :: UserTypeCtxt -> LHsType Name -> TcM Type

tcHsDeriv :: HsType Name -> TcM ([TyVar], Class, [Type], Kind)

tcHsVectInst :: LHsType Name -> TcM (Class, [Type])

tcHsInstHead :: UserTypeCtxt -> LHsType Name -> TcM ([TyVar], ThetaType, Class, [Type])

data UserTypeCtxt

Constructors

FunSigCtxt Name |
InfSigCtxt Name |
ExprSigCtxt |
ConArgCtxt Name |
TySynCtxt Name |
PatSigCtxt |
RuleSigCtxt Name |
ResSigCtxt |
ForSigCtxt Name |
DefaultDeclCtxt |
InstDeclCtxt |
SpecInstCtxt |
ThBrackCtxt |
GenSigCtxt |
GhciCtxt |
ClassSCCtxt Name |
SigmaCtxt |
DataTyCtxt Name |

kcLookupKind :: Name -> TcM Kind

kcTyClTyVars :: Name -> LHsTyVarBndrs Name -> TcM a -> TcM a

tcTyClTyVars :: Name -> LHsTyVarBndrs Name -> ([TyVar] -> Kind -> TcM a) -> TcM a

tcHsConArgType :: NewOrData -> LHsType Name -> TcM Type

tcDataKindSig :: Kind -> TcM [TyVar]

tcClassSigType :: LHsType Name -> TcM Type

kcHsTyVarBndrs

Arguments

:: Bool | True = the decl being checked has a CUSK
-> LHsTyVarBndrs Name |
-> TcM (Kind, r) | the result kind, possibly with other info
-> TcM (Kind, r) | The full kind of the thing being declared, with the other info

Kind-check a `LHsTyVarBndrs`. If the decl under consideration has a complete, user-supplied kind signature (CUSK), generalise the result. Used in `getInitialKind` and in kind-checking. See also Note [Complete user-supplied kind signatures] in HsDecls.

tcHsTyVarBndrs :: LHsTyVarBndrs Name -> ([TcTyVar] -> TcM r) -> TcM r

tcHsLiftedType :: LHsType Name -> TcM TcType

tcHsOpenType :: LHsType Name -> TcM TcType

tcLHsType :: LHsType Name -> TcM (TcType, TcKind)

tcCheckLHsType :: LHsType Name -> Kind -> TcM Type

tcHsContext :: LHsContext Name -> TcM [PredType]

tcInferApps :: Outputable a => a -> TcKind -> [LHsType Name] -> TcM ([TcType], TcKind)

tcHsArgTys :: SDoc -> [LHsType Name] -> [Kind] -> TcM [TcType]

kindGeneralize :: TyVarSet -> TcM [KindVar]

checkKind :: TcKind -> TcKind -> TcM ()

tcLHsKind :: LHsKind Name -> TcM Kind

tcHsPatSigType :: UserTypeCtxt -> HsWithBndrs Name (LHsType Name) -> TcM (Type, [(Name, TcTyVar)], [(Name, TcTyVar)])

tcPatSig :: Bool -> HsWithBndrs Name (LHsType Name) -> TcSigmaType -> TcM (TcType, [(Name, TcTyVar)], [(Name, TcTyVar)], HsWrapper)