ddc-core-simpl-0.4.3.1: Disciplined Disciple Compiler code transformations.
DDC.Core.Transform.Rewrite.Match
Contents
Description
Create substitution to make (subst template) == target
Synopsis
type SubstInfo a n = (Map n (Exp a n), Map n (Type n)) Source #
Value and type substition.
emptySubstInfo :: SubstInfo a n Source #
An empty substition info.
match Source #
Arguments
Current substitution
Variables we're interested in
Template expression.
Target expression.
Create substitution to make (subst template) == target Does not handle higher-order templates (ie ones with binders)
@ match emptySubstInfo (Set.fromList [r1, r2, s]) (stream [r1] (unstream [r2] s)) (stream [R0] (someStream 23))
@