Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- tcTyVar_maybe :: Type -> Maybe Var
- instantiateType :: Type -> ([TyVar], Type)
- cloneTyVar :: TyVar -> TyVar
- isFunction :: Type -> Bool
- tacticsSplitFunTy :: Type -> ([TyVar], ThetaType, [Type], Type)
- tacticsThetaTy :: Type -> ThetaType
- freshTyvars :: MonadState TacticState m => Type -> m Type
- getRecordFields :: DataCon -> Maybe [(OccName, CType)]
- algebraicTyCon :: Type -> Maybe TyCon
- eqRdrName :: RdrName -> RdrName -> Bool
- containsHsVar :: Data a => RdrName -> a -> Bool
- containsHole :: Data a => a -> Bool
- isHole :: OccName -> Bool
- allOccNames :: Data a => a -> Set OccName
- pattern Lambda :: [Pat GhcPs] -> HsExpr GhcPs -> HsExpr GhcPs
- pattern UnguardedRHSs :: HsExpr GhcPs -> GRHSs GhcPs (LHsExpr GhcPs)
- pattern SinglePatMatch :: Pat GhcPs -> HsExpr GhcPs -> Match GhcPs (LHsExpr GhcPs)
- unpackMatches :: [Match GhcPs (LHsExpr GhcPs)] -> Maybe [(Pat GhcPs, HsExpr GhcPs)]
- pattern Case :: HsExpr GhcPs -> [(Pat GhcPs, HsExpr GhcPs)] -> HsExpr GhcPs
- lambdaCaseable :: Type -> Maybe Bool
- fromPatCompatTc :: PatCompat GhcTc -> Pat GhcTc
- fromPatCompatPs :: PatCompat GhcPs -> Pat GhcPs
- type PatCompat pass = LPat pass
- pattern TopLevelRHS :: OccName -> [PatCompat GhcTc] -> LHsExpr GhcTc -> Match GhcTc (LHsExpr GhcTc)
- getPatName :: PatCompat GhcTc -> Maybe OccName
- dataConExTys :: DataCon -> [TyCoVar]
- unXPat :: Pat GhcPs -> Pat GhcPs
Documentation
cloneTyVar :: TyVar -> TyVar Source #
isFunction :: Type -> Bool Source #
Is this a function type?
tacticsSplitFunTy :: Type -> ([TyVar], ThetaType, [Type], Type) Source #
Split a function, also splitting out its quantified variables and theta context.
tacticsThetaTy :: Type -> ThetaType Source #
Rip the theta context out of a regular type.
freshTyvars :: MonadState TacticState m => Type -> m Type Source #
Instantiate all of the quantified type variables in a type with fresh skolems.
getRecordFields :: DataCon -> Maybe [(OccName, CType)] Source #
Given a datacon, extract its record fields' names and types. Returns nothing if the datacon is not a record.
containsHole :: Data a => a -> Bool Source #
Does this thing contain any holes?
pattern Lambda :: [Pat GhcPs] -> HsExpr GhcPs -> HsExpr GhcPs Source #
A pattern over the otherwise (extremely) messy AST for lambdas.
pattern UnguardedRHSs :: HsExpr GhcPs -> GRHSs GhcPs (LHsExpr GhcPs) Source #
A GRHS that caontains no guards.
pattern SinglePatMatch :: Pat GhcPs -> HsExpr GhcPs -> Match GhcPs (LHsExpr GhcPs) Source #
A match with a single pattern. Case matches are always SinglePatMatch
es.
unpackMatches :: [Match GhcPs (LHsExpr GhcPs)] -> Maybe [(Pat GhcPs, HsExpr GhcPs)] Source #
Helper function for defining the Case
pattern.
pattern Case :: HsExpr GhcPs -> [(Pat GhcPs, HsExpr GhcPs)] -> HsExpr GhcPs Source #
A pattern over the otherwise (extremely) messy AST for lambdas.
lambdaCaseable :: Type -> Maybe Bool Source #
Can ths type be lambda-cased?
Return: Nothing
if no
Just False
if it can't be homomorphic
Just True
if it can
pattern TopLevelRHS :: OccName -> [PatCompat GhcTc] -> LHsExpr GhcTc -> Match GhcTc (LHsExpr GhcTc) Source #
Should make sure it's a fun bind
dataConExTys :: DataCon -> [TyCoVar] Source #