Commit e9980318 authored by POTTIER Francois's avatar POTTIER Francois

Add support for [nativeint].

parent 4d0f3380
......@@ -100,6 +100,10 @@ class ['self] iter = object (self)
f env x;
self # visit_list f env xs
method private visit_nativeint: 'env .
'env -> nativeint -> unit
= fun _ _ -> ()
method private visit_option: 'env 'a .
('env -> 'a -> unit) -> 'env -> 'a option -> unit
= fun f env ox ->
......@@ -185,6 +189,10 @@ class ['self] map = object (self)
let x = f env x in
x :: self # visit_list f env xs
method private visit_nativeint: 'env .
'env -> nativeint -> nativeint
= fun _ x -> x
method private visit_option: 'env 'a 'b .
('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option
= fun f env ox ->
......@@ -281,6 +289,10 @@ class ['self] endo = object (self)
else
x' :: xs'
method private visit_nativeint: 'env .
'env -> nativeint -> nativeint
= fun _ x -> x
method private visit_option: 'env 'a .
('env -> 'a -> 'a) -> 'env -> 'a option -> 'a option
= fun f env ox ->
......@@ -397,6 +409,10 @@ class virtual ['self] reduce = object (self : 'self)
let z = self#plus z (f env x) in
self # list_fold_left f env z xs
method private visit_nativeint: 'env .
'env -> nativeint -> 'z
= fun _env _ -> self#zero
method private visit_option: 'env 'a .
('env -> 'a -> 'z) -> 'env -> 'a option -> 'z
= fun f env ox ->
......@@ -489,6 +505,10 @@ class ['self] iter2 = object (self)
| _, _ ->
fail()
method private visit_nativeint: 'env .
'env -> nativeint -> nativeint -> unit
= fun _ x1 x2 -> if x1 = x2 then () else fail()
method private visit_option: 'env 'a 'b .
('env -> 'a -> 'b -> unit) -> 'env -> 'a option -> 'b option -> unit
= fun f env ox1 ox2 ->
......@@ -579,6 +599,10 @@ class ['self] map2 = object (self)
| _, _ ->
fail()
method private visit_nativeint: 'env .
'env -> nativeint -> nativeint -> nativeint
= fun _ x1 x2 -> if x1 = x2 then x1 else fail()
method private visit_option: 'env 'a 'b 'c .
('env -> 'a -> 'b -> 'c) -> 'env -> 'a option -> 'b option -> 'c option
= fun f env ox1 ox2 ->
......@@ -683,6 +707,11 @@ class virtual ['self] reduce2 = object (self : 'self)
else
fail()
method private visit_nativeint: 'env .
'env -> nativeint -> nativeint -> 'z
= fun _env x1 x2 ->
if x1 = x2 then self#zero else fail()
method private visit_option: 'env 'a 'b .
('env -> 'a -> 'b -> 'z) -> 'env -> 'a option -> 'b option -> 'z
= fun f env ox1 ox2 ->
......
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