Commit 29206bde authored by POTTIER Francois's avatar POTTIER Francois

Changed [lookup] to take [env] first.

parent f4786cb6
......@@ -26,7 +26,8 @@
The combinator [inner(p)] can be viewed as sugar for [rebind(outer(p))].
Our [rebind(p)] takes just one argument. Weirich et al.'s [rebind],
which takes two arguments, is emulated by writing [p1 * rebind(p2)]. *)
which takes two arguments, is emulated by writing [p1 * rebind(p2)].
This encoding relies on the fact that pairs are traversed left-to-right. *)
(* -------------------------------------------------------------------------- *)
......@@ -155,7 +156,7 @@ let check_recursive_permitted (penv : 'env penv) : unit =
class virtual ['self] map = object (self : 'self)
method private virtual extend: 'bn1 -> 'env -> 'bn2 * 'env
method private virtual lookup: 'bn1 -> 'env -> 'bn2
method private virtual lookup: 'env -> 'bn1 -> 'bn2
(* [visit_abstraction] initializes an enriched environment using the
auxiliary function [abstraction]. *)
......@@ -182,7 +183,7 @@ class virtual ['self] map = object (self : 'self)
penv.current := env;
x2
| Lookup ->
self#lookup x1 env
self#lookup env x1
(* [inner(p)] can be viewed as sugar for [rebind(outer(p))]. Therefore, this
code should ideally be generated. *)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment