Yicho: A Combinator Library for Program TransformationContentsIndex
Yicho.Substitutions
Portabilityportable
Stabilityexperimental
Maintaineryokoyama@ipl.t.u-tokyo.ac.jp
Contents
Apply Substitution
Description
Synopsis
type Subst = Map Name Exp
idSubst :: Subst
mapvar :: Name -> Exp -> Subst
compose :: Subst -> Subst -> Subst
doms :: Subst -> [Name]
targets :: Subst -> [Exp]
filterSubst :: (Name -> Exp -> Bool) -> Subst -> Subst
removeSubst :: [Name] -> Subst -> Subst
maptarget :: (Exp -> Exp) -> Subst -> Subst
lookupSubst :: Subst -> Name -> Maybe Exp
listToSubst :: [(Name, Exp)] -> Subst
substToList :: Subst -> [(Name, Exp)]
addToSubst :: Subst -> Name -> Exp -> Subst
intersection :: Subst -> Subst -> Subst
nullSubst :: Subst -> Bool
class Substitutable a where
appSubst :: Subst -> a -> a
unboundlocalsSubst :: Subst -> [Name]
isClosedSubst :: (Subst, [Name]) -> Bool
Documentation
type Subst = Map Name Exp
Hash table would be better if scaling up
idSubst :: Subst
mapvar :: Name -> Exp -> Subst
compose :: Subst -> Subst -> Subst
doms :: Subst -> [Name]
targets :: Subst -> [Exp]
filterSubst :: (Name -> Exp -> Bool) -> Subst -> Subst
removeSubst :: [Name] -> Subst -> Subst
maptarget :: (Exp -> Exp) -> Subst -> Subst
lookupSubst :: Subst -> Name -> Maybe Exp
listToSubst :: [(Name, Exp)] -> Subst
substToList :: Subst -> [(Name, Exp)]
addToSubst :: Subst -> Name -> Exp -> Subst
intersection :: Subst -> Subst -> Subst
nullSubst :: Subst -> Bool
Apply Substitution
class Substitutable a where
Methods
appSubst :: Subst -> a -> a
show/hide Instances
unboundlocalsSubst :: Subst -> [Name]
isClosedSubst :: (Subst, [Name]) -> Bool
Produced by Haddock version 0.6