Commit cfd869cf authored by POTTIER Francois's avatar POTTIER Francois

Added missing method [plus] at type [unit].

Renaming.
parent 9d775aeb
......@@ -63,9 +63,9 @@ class virtual ['self] map = object (self : 'self)
_ ->
('env -> 'term1 -> 'term2) ->
'env -> ('bn1, 'term1) abs -> ('bn2, 'term2) abs
= fun _ f env (x, body) ->
= fun _ f env (x, t) ->
let x', env' = self#extend x env in
x', f env' body
x', f env' t
method private visit_def: 'term1 'term2 .
_ ->
......@@ -94,13 +94,13 @@ class virtual ['self] endo = object (self : 'self)
_ ->
('env -> 'term -> 'term) ->
'env -> ('bn, 'term) abs -> ('bn, 'term) abs
= fun _ f env ((x, body) as this) ->
= fun _ f env ((x, t) as this) ->
let x', env' = self#extend x env in
let body' = f env' body in
if x == x' && body == body' then
let t' = f env' t in
if x == x' && t == t' then
this
else
x', body'
x', t'
method private visit_def: 'term .
_ ->
......@@ -136,9 +136,9 @@ class virtual ['self] reduce = object (self : 'self)
_ ->
('env -> 'term -> 'z) ->
'env -> ('bn, 'term) abs -> 'z
= fun _ f env (x, body) ->
= fun _ f env (x, t) ->
let env' = self#extend x env in
self#restrict x (f env' body)
self#restrict x (f env' t)
method private visit_def: 'term .
_ ->
......@@ -160,6 +160,7 @@ class virtual ['self] iter = object (_ : 'self)
inherit ['self] reduce
method private plus () () = ()
method private restrict _ () = ()
end
......@@ -179,9 +180,9 @@ class virtual ['self] map2 = object (self : 'self)
_ ->
('env -> 'term1 -> 'term2 -> 'term3) ->
'env -> ('bn1, 'term1) abs -> ('bn2, 'term2) abs -> ('bn3, 'term3) abs
= fun _ f env (x1, body1) (x2, body2) ->
= fun _ f env (x1, t1) (x2, t2) ->
let x3, env' = self#extend x1 x2 env in
x3, f env' body1 body2
x3, f env' t1 t2
method private visit_def: 'term1 'term2 'term3 .
_ ->
......@@ -214,9 +215,9 @@ class virtual ['self] reduce2 = object (self : 'self)
_ ->
('env -> 'term1 -> 'term2 -> 'z) ->
'env -> ('bn1, 'term1) abs -> ('bn2, 'term2) abs -> 'z
= fun _ f env (x1, body1) (x2, body2) ->
= fun _ f env (x1, t1) (x2, t2) ->
let env' = self#extend x1 x2 env in
self#restrict x1 x2 (f env' body1 body2)
self#restrict x1 x2 (f env' t1 t2)
method private visit_def: 'term1 'term2 .
_ ->
......@@ -238,6 +239,7 @@ class virtual ['self] iter2 = object (_ : 'self)
inherit ['self] reduce2
method private plus () () = ()
method private restrict _ _ () = ()
end
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