ligo/src/proto/alpha/roll_repr.ml
2017-02-25 18:14:05 +01:00

24 lines
841 B
OCaml

(**************************************************************************)
(* *)
(* Copyright (c) 2014 - 2016. *)
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
type t = int32
type roll = t
let encoding = Data_encoding.int32
let first = 0l
let succ i = Int32.succ i
let random sequence ~bound =
Seed_repr.take_int32 sequence bound
let to_int32 v = v
let (=) = Compare.Int32.(=)