Yicho: A Combinator Library for Program TransformationContentsIndex
Yicho.HMatch
Portabilityportable
Stabilityexperimental
Maintaineryokoyama@ipl.t.u-tokyo.ac.jp
Description
Synopsis
hmatch :: Exp -> Exp -> HM Subst
hm :: CL -> CL -> HM Subst
infix2prefix :: Exp -> HM Exp
data ArgStatus = ArgStatus {
from :: Exp
to :: Exp
}
patternize :: [Name] -> (Exp, Exp) -> ArgStatus
detargs :: ([Name], [Name]) -> [Exp] -> Bool
validLTargs :: [Name] -> [Exp] -> Bool
replacesLT :: CL -> StateT ([ArgStatus], Subst) (ErrorT String Q) Exp
replaceLT :: CL -> StateT ([ArgStatus], Subst) (ErrorT String Q) Exp
compatibleCompose :: Subst -> Subst -> HM Subst
dreplaces :: CL -> [(CL, CL)] -> HM (CL, Subst)
dreplace :: CL -> (CL, CL) -> HM (CL, Subst)
betareduce :: Exp -> Exp
patexpmatch :: Pat -> Exp -> Maybe Subst
Documentation
hmatch
:: ExpPattern
-> ExpTerm
-> HM Subst
Higher-order matching
hm
:: CLPattern
-> CLTerm
-> HM Subst
infix2prefix :: Exp -> HM Exp
Converting an infix expression into a prefix expression
data ArgStatus
Constructors
ArgStatus
from :: Exp
to :: Exp
show/hide Instances
patternize
:: [Name]
-> (Exp, Exp)(from,to)
-> ArgStatus
detargs :: ([Name], [Name]) -> [Exp] -> Bool
validLTargs :: [Name] -> [Exp] -> Bool
Whether are they valid arguments for A_{LT} patterns
replacesLT :: CL -> StateT ([ArgStatus], Subst) (ErrorT String Q) Exp
p (x y -> body) we assume body does not contain lambda abstraction
replaceLT :: CL -> StateT ([ArgStatus], Subst) (ErrorT String Q) Exp
compatibleCompose :: Subst -> Subst -> HM Subst
dreplaces :: CL -> [(CL, CL)] -> HM (CL, Subst)
dreplace :: CL -> (CL, CL) -> HM (CL, Subst)
betareduce :: Exp -> Exp
patexpmatch :: Pat -> Exp -> Maybe Subst
For beta reduction
Produced by Haddock version 0.6