Commits

Dmitry Grebeniuk  committed 3df3abf

+ Partapp (explicit partial applications)

  • Participants
  • Parent commits 760e5e0

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
+  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
 
 Executable tests
   Path:       test
 (* setup.ml generated for the first time by OASIS v0.2.1~alpha1 *)
 
 (* OASIS_START *)
-(* DO NOT EDIT (digest: 8ec964d083ae5c21877694eb69fbb014) *)
+(* DO NOT EDIT (digest: 0fe1cde683bf1afea07e7e8e166c0303) *)
 (*
    Regenerated by OASIS v0.2.1~alpha1
    Visit http://oasis.forge.ocamlcore.org for more information and
                            "TlsArray_st";
                            "TlsArray_mt";
                            "TlsRef";
-                           "Cd_Ref"
+                           "Cd_Ref";
+                           "Cd_Partapp"
                         ];
                       lib_internal_modules = [];
                       lib_findlib_parent = None;

File src/cadastr.mllib

 # OASIS_START
-# DO NOT EDIT (digest: 2175a82f3c03343db93d84fa9706a3a0)
+# DO NOT EDIT (digest: 6749ad770225fa55922feb23dbbedac6)
 Cadastr
 Monoid
 Cd_All
 TlsArray_mt
 TlsRef
 Cd_Ref
+Cd_Partapp
 # OASIS_STOP

File src/cd_All.ml

 module Bool = Cd_Bool.Bool;
 module Ref = Cd_Ref.Ref;
 module Option = Cd_Option.Option;
+module Partapp = Cd_Partapp.Partapp;
 include Cd_Tuples;
 
 include Cd_Ops;

File src/cd_Partapp.ml

+module Partapp
+ :
+  sig
+    type partapp 'a 'b = private ('a -> 'b);
+    value make : ('a -> 'b) -> partapp 'a 'b;
+    value apply : partapp 'a 'b -> 'a -> 'b;
+  end
+ =
+  struct
+    type partapp 'a 'b = 'a -> 'b;
+    external make : ('a -> 'b) -> partapp 'a 'b = "%identity";
+    value apply
+     : partapp 'a 'b -> 'a -> 'b
+     = fun f x -> f x
+    ;
+  end
+;