Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
GHC plugin converting to CCC form.
Synopsis
- pattern FunCo' :: Role -> Coercion -> Coercion -> Coercion
- mkFunCo' :: Role -> Coercion -> Coercion -> Coercion
- pattern FunTy' :: Type -> Type -> Type
- mkFunTy' :: Type -> Type -> Type
- splitFunTy_maybe' :: Type -> Maybe (Type, Type)
- data CccEnv = CccEnv {
- dtrace :: forall a. String -> SDoc -> a -> a
- cccV :: Id
- cccPV :: Id
- uncccV :: Id
- closedTc :: TyCon
- idV :: Id
- constV :: Id
- forkV :: Id
- applyV :: Id
- composeV :: Id
- curryV :: Id
- uncurryV :: Id
- ifV :: Id
- exlV :: Id
- exrV :: Id
- constFunV :: Id
- fmapV :: Id
- fmapT1V :: Id
- fmapT2V :: Id
- casePairTopTV :: Id
- casePairTV :: Id
- casePairLTV :: Id
- casePairRTV :: Id
- flipForkTV :: Id
- castConstTV :: Id
- reprCV :: Id
- abstCV :: Id
- coerceV :: Id
- bottomTV :: Id
- repTc :: TyCon
- prePostV :: Id
- boxers :: UniqDFM TyCon Id
- tagToEnumV :: Id
- bottomV :: Id
- boxIBV :: Id
- ifEqIntHash :: Id
- inlineV :: Id
- uniqSupply :: UniqSupply
- hsc_env :: HscEnv
- ruleBase :: RuleBase
- okTypeTc :: TyCon
- enablePolymorphism :: Bool
- lintSteps :: Bool
- type Rewrite a = a -> Maybe a
- type ReExpr = Rewrite CoreExpr
- type ReExpr2 = CoreExpr -> Rewrite CoreExpr
- trying :: (String -> SDoc -> Bool -> Bool) -> String -> a -> Bool
- type Cat = Type
- ccc :: CccEnv -> Ops -> Type -> ReExpr
- pattern Coerce :: Cat -> Type -> Type -> CoreExpr
- pattern Compose :: Cat -> Type -> Type -> Type -> CoreExpr -> CoreExpr -> CoreExpr
- composeR :: CccEnv -> Ops -> ReExpr2
- pattern CatVar :: String -> Id
- catSuffix :: Id -> Maybe String
- isCoerceV :: Id -> Bool
- isComposeV :: Id -> Bool
- data Ops = Ops {
- inlineE :: Unop CoreExpr
- boxCon :: ReExpr
- catTy :: Unop Type
- reCatCo :: Rewrite Coercion
- repTy :: Unop Type
- unfoldMaybe' :: ReExpr
- unfoldMaybe :: ReExpr
- inlineMaybe :: Id -> Maybe CoreExpr
- noDictErr :: forall a. SDoc -> Either SDoc a -> a
- onDictTry :: CoreExpr -> Either SDoc CoreExpr
- onDictMaybe :: ReExpr
- onDict :: Unop CoreExpr
- onDicts :: Unop CoreExpr
- buildDictMaybe :: Type -> Either SDoc CoreExpr
- catOp :: Cat -> Var -> [Type] -> CoreExpr
- catOpMaybe :: Cat -> Var -> [Type] -> Maybe CoreExpr
- mkCcc :: Unop CoreExpr
- mkId :: Cat -> Type -> CoreExpr
- mkCompose :: Cat -> Binop CoreExpr
- mkCompose' :: Cat -> ReExpr2
- mkEx :: Cat -> Var -> Unop CoreExpr
- mkFork :: Cat -> Binop CoreExpr
- mkFork' :: Cat -> ReExpr2
- mkApplyMaybe :: Cat -> Type -> Type -> Maybe CoreExpr
- isClosed :: Cat -> Bool
- mkCurry :: Cat -> Unop CoreExpr
- mkCurry' :: Cat -> ReExpr
- mkUncurryMaybe :: Cat -> ReExpr
- mkIfC :: Cat -> Type -> Ternop CoreExpr
- mkBottomC :: Cat -> Type -> Type -> Maybe CoreExpr
- mkConst :: Cat -> Type -> ReExpr
- mkConst' :: Cat -> Type -> ReExpr
- mkConstFun :: Cat -> Type -> ReExpr
- mkAbstC :: Cat -> Type -> CoreExpr
- mkReprC :: Cat -> Type -> CoreExpr
- mkReprC' :: Cat -> Type -> CoreExpr
- mkAbstC' :: Cat -> Type -> CoreExpr
- mkReprC'_maybe :: Cat -> Type -> Maybe CoreExpr
- mkAbstC'_maybe :: Cat -> Type -> Maybe CoreExpr
- mkCoerceC :: Cat -> Type -> Type -> CoreExpr
- mkCoerceC_maybe :: Cat -> Type -> Type -> Maybe CoreExpr
- traceRewrite :: forall f a b. (Functor f, Outputable a, Outputable b) => String -> Unop (a -> f b)
- tyArgs2_maybe :: Type -> Maybe (Type, Type)
- tyArgs2 :: Type -> (Type, Type)
- pprTrans :: forall a b. (Outputable a, Outputable b) => String -> a -> b -> b
- lintReExpr :: Unop ReExpr
- transCatOp :: ReExpr
- reCat :: ReExpr
- isPseudoApp :: CoreExpr -> Bool
- normType :: Role -> Type -> (Coercion, Type)
- okType :: Type -> Bool
- optimizeCoercion :: Coercion -> Coercion
- subst :: [Var] -> [(Id, CoreExpr)] -> Unop CoreExpr
- eqTypeNormalising :: Type -> Type -> Maybe (Type, Type)
- mkOps :: CccEnv -> ModGuts -> AnnEnv -> FamInstEnvs -> DynFlags -> InScopeEnv -> Type -> CoreExpr -> Type -> Ops
- substFriendly :: Bool -> CoreExpr -> Bool
- isVarTyCos :: CoreExpr -> Bool
- isTrivial :: CoreExpr -> Bool
- incompleteCatOp :: CoreExpr -> Bool
- substFriendlyTy :: Type -> Bool
- substFriendlyTy' :: Type -> Bool
- catModule :: String
- trnModule :: String
- repModule :: String
- boxModule :: String
- okTypeModule :: String
- extModule :: String
- isTrivialCatOp :: CoreExpr -> Bool
- isSelectorId :: Id -> Bool
- isAbstReprId :: Id -> Bool
- pprWithType :: CoreExpr -> SDoc
- pprWithExplicitType :: CoreExpr -> Type -> SDoc
- pprWithType' :: CoreExpr -> SDoc
- pprMbWithType :: Maybe CoreExpr -> SDoc
- cccRuleName :: FastString
- composeRuleName :: FastString
- evidenceRuleName :: FastString
- cccRules :: Maybe (IORef Int) -> FamInstEnvs -> CccEnv -> ModGuts -> AnnEnv -> DynFlags -> [CoreRule]
- evidencePass :: CccEnv -> ModGuts -> CoreM ModGuts
- plugin :: Plugin
- parseOpt :: Read a => String -> [CommandLineOption] -> Maybe a
- install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
- mkCccEnv :: [CommandLineOption] -> CoreM CccEnv
- cccRuledArities :: Map String Int
- monoInfo :: [(String, (String, String, [Type]))]
- floatModule :: String
- pp :: Outputable a => a -> String
- on_mg_rules :: Unop [CoreRule] -> Unop ModGuts
- fqVarName :: Var -> String
- uqVarName :: Var -> String
- varModuleName :: Var -> Maybe String
- nameModuleName_maybe :: Name -> Maybe String
- uniqVarName :: Var -> String
- qualifiedName :: Name -> String
- onHead :: Unop a -> Unop [a]
- collectTyArgs :: CoreExpr -> (CoreExpr, [Type])
- collectTysDictsArgs :: CoreExpr -> (CoreExpr, [Type], [CoreExpr])
- collectArgsPred :: (CoreExpr -> Bool) -> CoreExpr -> (CoreExpr, [CoreExpr])
- collectTyCoDictArgs :: CoreExpr -> (CoreExpr, [CoreExpr])
- collectNonTyCoDictArgs :: CoreExpr -> (CoreExpr, [CoreExpr])
- isTyCoDictArg :: CoreExpr -> Bool
- isPred :: CoreExpr -> Bool
- stringExpr :: String -> CoreExpr
- varNameExpr :: Id -> CoreExpr
- onCaseRhs :: Type -> Unop (Unop CoreExpr)
- onAltRhs :: Unop CoreExpr -> Unop CoreAlt
- coercionTag :: Coercion -> String
- inlineId :: Id -> Maybe CoreExpr
- inlineClassOp :: Id -> Maybe CoreExpr
- exprHead :: CoreExpr -> Maybe Id
- onExprHead :: DynFlags -> (Id -> Maybe CoreExpr) -> ReExpr
- freshId :: VarSet -> String -> Type -> Id
- freshDeadId :: VarSet -> String -> Type -> Id
- (<+) :: Binop (a -> Maybe b)
- apps :: CoreExpr -> [Type] -> [CoreExpr] -> CoreExpr
- varApps :: Id -> [Type] -> [CoreExpr] -> CoreExpr
- conApps :: DataCon -> [Type] -> [CoreExpr] -> CoreExpr
- unVarApps :: CoreExpr -> Maybe (Id, [Type], [CoreExpr])
- isFreeIn :: Var -> CoreExpr -> Bool
- isFreeIns :: Var -> [CoreExpr] -> Bool
- pairTy :: Binop Type
- etaReduce_maybe :: ReExpr
- etaReduce1 :: Unop CoreExpr
- etaReduceN :: Unop CoreExpr
- funCat :: Cat
- liftedExpr :: CoreExpr -> Bool
- liftedType :: Type -> Bool
- pattern PairVar :: CoreExpr
- isPairVar :: Var -> Bool
- isMonoTy :: Type -> Bool
- isMono :: CoreExpr -> Bool
- idOccs :: Bool -> Id -> CoreExpr -> Int
- isPredTy' :: Type -> Bool
- starKind :: Kind
- castE :: Coercion -> CoreExpr
- pprCoWithType :: Coercion -> SDoc
- setNominalRole_maybe' :: Coercion -> Maybe Coercion
- eitherToMaybe :: Either a b -> Maybe b
- altRhs :: Alt b -> Expr b
- altVars :: Alt b -> [b]
- isCast :: Expr b -> Bool
- everywhereM' :: Monad m => GenericM m -> GenericM m
- exprConstr :: Expr b -> String
- hasTyCon :: TyCon -> Type -> Bool
- mkCase1 :: CoreExpr -> Id -> [CoreAlt] -> CoreExpr
- unsafeLimit :: Maybe (IORef Int) -> Unop (Maybe a)
- alwaysSubst :: CoreExpr -> Bool
- mkCoercible :: Kind -> Type -> Type -> Coercion -> CoreExpr
- isFunCat :: Type -> Bool
- deadifyCaseWild :: ReExpr
Documentation
CccEnv | |
|
isComposeV :: Id -> Bool Source #
mkOps :: CccEnv -> ModGuts -> AnnEnv -> FamInstEnvs -> DynFlags -> InScopeEnv -> Type -> CoreExpr -> Type -> Ops Source #
isVarTyCos :: CoreExpr -> Bool Source #
incompleteCatOp :: CoreExpr -> Bool Source #
substFriendlyTy :: Type -> Bool Source #
substFriendlyTy' :: Type -> Bool Source #
isTrivialCatOp :: CoreExpr -> Bool Source #
isSelectorId :: Id -> Bool Source #
isAbstReprId :: Id -> Bool Source #
pprWithType :: CoreExpr -> SDoc Source #
pprWithType' :: CoreExpr -> SDoc Source #
cccRules :: Maybe (IORef Int) -> FamInstEnvs -> CccEnv -> ModGuts -> AnnEnv -> DynFlags -> [CoreRule] Source #
module name for categorical counterpart (always catModule now)
categorical operation name
type arguments to cat op
floatModule :: String Source #
pp :: Outputable a => a -> String Source #
uniqVarName :: Var -> String Source #
isTyCoDictArg :: CoreExpr -> Bool Source #
stringExpr :: String -> CoreExpr Source #
varNameExpr :: Id -> CoreExpr Source #
coercionTag :: Coercion -> String Source #
liftedExpr :: CoreExpr -> Bool Source #
liftedType :: Type -> Bool Source #
idOccs :: Bool -> Id -> CoreExpr -> Int Source #
Number of occurrences of a given Id in an expression. Gives a large value if the Id appears under a lambda.
pprCoWithType :: Coercion -> SDoc Source #
eitherToMaybe :: Either a b -> Maybe b Source #
everywhereM' :: Monad m => GenericM m -> GenericM m Source #
Monadic variation on everywhere (bottom-up) everywhereM :: Monad m => GenericM m -> GenericM m everywhereM f = f <=< gmapM (everywhereM2 f)
Monadic variation on everywhere' (top-down)
exprConstr :: Expr b -> String Source #
alwaysSubst :: CoreExpr -> Bool Source #