Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
bobzhang committed Dec 24, 2017
1 parent 33a7078 commit 07f8279
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions jscomp/others/bs_internalAVLtree.ml
Expand Up @@ -13,20 +13,14 @@
(** Adapted by authors of BuckleScript without using functors *)


type ('k, + 'v) node

external node :
left:('k,'v) node Js.null ->
key: 'k ->
value:'v ->
right:('k,'v) node Js.null ->
h:int -> ('k,'v) node = "" [@@bs.obj]

external left : ('k,'v) node -> ('k,'v) node Js.null = "left" [@@bs.get]
external key : ('k,'v) node -> 'k = "key" [@@bs.get]
external value : ('k,'v) node -> 'v = "value" [@@bs.get]
external right : ('k,'v) node -> ('k,'v) node Js.null = "right" [@@bs.get]
external h : _ node -> int = "h" [@@bs.get]
type ('k, + 'v) node = {
left : ('k,'v) node Js.null;
key : 'k;
value : 'v;
right : ('k,'v) node Js.null;
h : int
} [@@bs.deriving abstract]

external toOpt : 'a Js.null -> 'a option = "#null_to_opt"
external return : 'a -> 'a Js.null = "%identity"
external empty : 'a Js.null = "#null"
Expand Down

0 comments on commit 07f8279

Please sign in to comment.