unbound-generics icon indicating copy to clipboard operation
unbound-generics copied to clipboard

Variable capture when substituting in `Rebind` patterns

Open lambdageek opened this issue 11 years ago • 1 comments

Migrated from unbound issue tracker - issue 25

Should be able to detect & fail when capture occurs while substituting in patterns. For example,

subst (Rebind x y) (Var x)

will produce an invalid pattern. The variable x will still be a free variable, even though the pattern binds > variables of that name. This behavior should be caught and an appropriate error message given.

May also be worth having a Maybe version of subst.

lambdageek avatar Oct 13 '14 14:10 lambdageek

First step is to create a real test case.

lambdageek avatar Oct 13 '14 14:10 lambdageek