Safe Haskell | None |
---|---|
Language | Haskell2010 |
- externals :: [External]
- alphaR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Rewrite c m Core
- alphaLamR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Maybe String -> Rewrite c m CoreExpr
- alphaCaseBinderR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Maybe String -> Rewrite c m CoreExpr
- alphaAltWithR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => [String] -> Rewrite c m CoreAlt
- alphaAltVarsR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => [Var] -> Rewrite c m CoreAlt
- alphaAltR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Rewrite c m CoreAlt
- alphaCaseR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Rewrite c m CoreExpr
- alphaLetWithR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => [String] -> Rewrite c m CoreExpr
- alphaLetVarsR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => [Var] -> Rewrite c m CoreExpr
- alphaLetR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Rewrite c m CoreExpr
- alphaProgConsWithR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => [String] -> Rewrite c m CoreProg
- alphaProgConsIdsR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => [Id] -> Rewrite c m CoreProg
- alphaProgConsR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Rewrite c m CoreProg
- alphaProgR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Rewrite c m CoreProg
- unshadowR :: (AddBindings c, BoundVars c, ExtendPath c Crumb, HasEmptyContext c, ReadPath c Crumb, MonadCatch m, MonadUnique m) => Rewrite c m Core
- unshadowExprR :: (AddBindings c, BoundVars c, ExtendPath c Crumb, ReadPath c Crumb, MonadCatch m, MonadUnique m) => Rewrite c m CoreExpr
- unshadowAltR :: (AddBindings c, BoundVars c, ExtendPath c Crumb, ReadPath c Crumb, MonadCatch m, MonadUnique m) => Rewrite c m CoreAlt
- unshadowProgR :: (AddBindings c, BoundVars c, ExtendPath c Crumb, ReadPath c Crumb, MonadCatch m, MonadUnique m) => Rewrite c m CoreProg
- visibleVarsT :: (BoundVars c, Monad m) => Transform c m CoreTC VarSet
- cloneVarAvoidingT :: (BoundVars c, MonadUnique m) => Var -> Maybe String -> [Var] -> Transform c m CoreTC Var
- freshNameGenAvoiding :: Maybe String -> VarSet -> String -> String
- detectShadowsM :: Monad m => [Var] -> VarSet -> m VarSet
- replaceVarR :: (Injection a Core, MonadCatch m) => Var -> Var -> Rewrite c m a
Alpha-Renaming and Shadowing
Alpha-Renaming
alphaR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Rewrite c m Core Source
Alpha rename any bindings at this node. Note: does not rename case alternatives unless invoked on the alternative.
alphaLamR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Maybe String -> Rewrite c m CoreExpr Source
Alpha rename a lambda binder. Optionally takes a suggested new name.
alphaCaseBinderR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Maybe String -> Rewrite c m CoreExpr Source
Alpha rename a case binder. Optionally takes a suggested new name.
alphaAltWithR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => [String] -> Rewrite c m CoreAlt Source
Rename the variables bound in a case alternative with the given list of suggested names.
alphaAltVarsR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => [Var] -> Rewrite c m CoreAlt Source
Rename the specified variables in a case alternative.
alphaAltR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Rewrite c m CoreAlt Source
Rename all identifiers bound in a case alternative.
alphaCaseR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Rewrite c m CoreExpr Source
Rename all identifiers bound in a case expression.
alphaLetWithR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => [String] -> Rewrite c m CoreExpr Source
Rename the identifiers bound in a Let with the given list of suggested names.
alphaLetVarsR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => [Var] -> Rewrite c m CoreExpr Source
Rename the specified variables bound in a let.
alphaLetR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Rewrite c m CoreExpr Source
Rename all identifiers bound in a Let.
alphaProgConsWithR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => [String] -> Rewrite c m CoreProg Source
Rename the identifiers bound in the top-level binding at the head of the program with the given list of suggested names.
alphaProgConsIdsR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => [Id] -> Rewrite c m CoreProg Source
Rename the specified variables bound in the top-level binding at the head of the program.
alphaProgConsR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Rewrite c m CoreProg Source
Rename all identifiers bound in the top-level binding at the head of the program.
alphaProgR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, BoundVars c, MonadCatch m, MonadUnique m) => Rewrite c m CoreProg Source
Rename all identifiers bound at the top-level.
Shadow Detection and Unshadowing
unshadowR :: (AddBindings c, BoundVars c, ExtendPath c Crumb, HasEmptyContext c, ReadPath c Crumb, MonadCatch m, MonadUnique m) => Rewrite c m Core Source
Rename local variables with manifestly unique names (x, x0, x1, ...). Does not rename top-level definitions.
unshadowExprR :: (AddBindings c, BoundVars c, ExtendPath c Crumb, ReadPath c Crumb, MonadCatch m, MonadUnique m) => Rewrite c m CoreExpr Source
unshadowAltR :: (AddBindings c, BoundVars c, ExtendPath c Crumb, ReadPath c Crumb, MonadCatch m, MonadUnique m) => Rewrite c m CoreAlt Source
unshadowProgR :: (AddBindings c, BoundVars c, ExtendPath c Crumb, ReadPath c Crumb, MonadCatch m, MonadUnique m) => Rewrite c m CoreProg Source
visibleVarsT :: (BoundVars c, Monad m) => Transform c m CoreTC VarSet Source
Collect all visible variables (in the expression or the context).
cloneVarAvoidingT :: (BoundVars c, MonadUnique m) => Var -> Maybe String -> [Var] -> Transform c m CoreTC Var Source
If a name is provided, use that as the name of the new variable. Otherwise modify the variable name making sure to not clash with the given variables or any visible variables.
freshNameGenAvoiding :: Maybe String -> VarSet -> String -> String Source
Use the optional argument if given, otherwise generate a new name avoiding clashes with the set of variables.
detectShadowsM :: Monad m => [Var] -> VarSet -> m VarSet Source
Shadows are any duplicates in the list, or any occurrences of the list elements in the set.
replaceVarR :: (Injection a Core, MonadCatch m) => Var -> Var -> Rewrite c m a Source
Replace all occurrences of a specified variable. Arguments are the variable to replace and the replacement variable, respectively.