Commits

Dmitry Grebeniuk  committed 9d27970

+ Int64

  • Participants
  • Parent commits 3df3abf

Comments (0)

Files changed (5)

   Path:       src
   BuildTools: ocamlbuild
   BuildDepends: num
-  Modules:    Cadastr, Monoid, Cd_All, Cd_Int, Cd_List, Cd_Ops, Cd_Byte, Cd_Bytes, Cd_Chars, Cd_Strings, Cd_Array, Cd_Typeinfo, Cdt, Cd_Types, Cd_Option, Cd_Num, Cd_Tuples, Cd_Bool, TlsArray, TlsArray_st, TlsArray_mt, TlsRef, Cd_Ref, Cd_Partapp
+  Modules:    Cadastr, Monoid, Cd_All, Cd_Int, Cd_List, Cd_Ops, Cd_Byte, Cd_Bytes, Cd_Chars, Cd_Strings, Cd_Array, Cd_Typeinfo, Cdt, Cd_Types, Cd_Option, Cd_Num, Cd_Tuples, Cd_Bool, TlsArray, TlsArray_st, TlsArray_mt, TlsRef, Cd_Ref, Cd_Partapp, Cd_Int64
 
 Executable tests
   Path:       test
 (* setup.ml generated for the first time by OASIS v0.2.1~alpha1 *)
 
 (* OASIS_START *)
-(* DO NOT EDIT (digest: 0fe1cde683bf1afea07e7e8e166c0303) *)
+(* DO NOT EDIT (digest: df577f7ab6ae7601fc2f49fb9b6b369d) *)
 (*
    Regenerated by OASIS v0.2.1~alpha1
    Visit http://oasis.forge.ocamlcore.org for more information and
                            "TlsArray_mt";
                            "TlsRef";
                            "Cd_Ref";
-                           "Cd_Partapp"
+                           "Cd_Partapp";
+                           "Cd_Int64"
                         ];
                       lib_internal_modules = [];
                       lib_findlib_parent = None;

File src/cadastr.mllib

 # OASIS_START
-# DO NOT EDIT (digest: 6749ad770225fa55922feb23dbbedac6)
+# DO NOT EDIT (digest: 5d2727e4cf196b12e583727005d60ffa)
 Cadastr
 Monoid
 Cd_All
 TlsRef
 Cd_Ref
 Cd_Partapp
+Cd_Int64
 # OASIS_STOP

File src/cd_All.ml

 module Int = Cd_Int.Int;
+module Int64 = Cd_Int64.Int64;
 module List = Cd_List.List;
 module Strings = Cd_Strings.Strings;
 module Byte = Cd_Byte.Byte;
 value ti_bool = Typeinfo.tifull_of_timod_full
   (module Bool : TIFULL with type t = Bool.t);
 *)
+value ti_int64 = (Int64.ti :> ti Int64.t)
+;
 
 module Cd = Cadastr;

File src/cd_Int64.ml

+module Int64
+ =
+  struct
+
+    open Cdt;
+
+    include Int64;
+
+    open Cd_Ops.Int64_as_int;
+
+    value monoid_plus = new Monoid.t 0L ( + );
+    value monoid_mult = new Monoid.t 1L ( * );
+    value monoid_land = new Monoid.t (-1L) (* all 1 bits *) ( logand );
+    value monoid_lor  = new Monoid.t 0L ( logor );
+
+
+    value cmp (x : t) (y : t) =
+      match compare x y with
+      [ 0 -> EQ
+      | x when x < 0 -> LT
+      | _ (* when _ > 0 *) -> GT
+      ]
+    ;
+
+    value hash (x : t) = Hashtbl.hash x
+    ;
+
+    value eq (x : t) (y : t) = (x = y)
+    ;
+
+    value show = to_string
+    ;
+
+    module Ops_
+     =
+      struct
+        value opt_cmp = cmp
+          and opt_eq = eq
+          and opt_hash = hash
+          and opt_show = show
+        ;
+      end
+    ;
+
+    include Ops_;
+
+    value ti =
+      new tifull ~cmp ~eq ~hash ~show (Simple "int64") ()
+    ;
+
+  end
+;