[e-lang] Remaining semantic issues
Mark Miller
markm at cs.jhu.edu
Mon Jan 24 14:00:27 EST 2005
[Resent with missing paren added. Ignore previous. --MarkM]
Kevin Reid wrote:
> def via (__curry(simple__quasiParser.matchMaker("foo @{0}").matchBind,
> __makeList.run())) [bar :int] := "foo baz"
Good, I now understand the problem. Is the following a valid transform of your
solution? It uses no new Kernel-E constructs, and it seems about as clean.
def makeMatchMakerGuard(mm :MatchMaker, args :any[]) :ValueGuard {
def matchMakerGuard {
to coerce(specimen, optEjector) :any {
return mm.matchBind(args, specimen, optEjector)
}
}
return matchMakerGuard
}
def x :(makeMatchMakerGuard(simple__quasiParser.matchMaker("foo @{0}"),[])) ?
x =~ [bar :int] := "foo baz"
If this does the job, then we should change various expansions, including the
quasiliteral pattern expansion, to use this adaptation of your technique.
--
Text by me above is hereby placed in the public domain
Cheers,
--MarkM
More information about the e-lang
mailing list