[Haskell-cafe] syntactic anti-unification of TH terms --- best practice?

Martin Hofmann martin.hofmann at uni-bamberg.de
Fri Jul 18 06:01:28 EDT 2008

> Don't you need to do this translation anyway, because Pat
> and Exp use different constructors? 

Yes, somewhere I have to say how to convert Pat to Exp.

> Perhaps you can reduce
> some of the lookup cases to looking up just Pat and Exp
> (eg, looking up in a Body or Clause or Pat or Exp could
> always give antiunifiers in terms of either Pat or Exp, so
> you need only one type of Map)?

So you mean use a specific (M.Map [Exp] Exp) instead of a general (M.Map
[a] a)? Yes, this would make sense. Then I only translate the value I
want to lookup (if at all) and not the whole map, which I can pass to
the accordant state transformer straight away.

I'll try it out.



More information about the Haskell-Cafe mailing list