Commits

camlspotter  committed 7ea51c2

preapring 1.0.1

  • Participants
  • Parent commits 4c989f1

Comments (0)

Files changed (6)

 OASISFormat: 0.2
 Name:        meta_conv
-Version:     1.0.0
+Version:     1.0.1
 Synopsis:    Meta conv, type_conv for various tree data format.
 Authors:     Jun FURUSE
 License:     LGPL-2.0 with OCaml linking exception
-version = "1.0.0"
+version = "1.0.1"
 description = "meta_conv - meta automated tree form type conversion"
 
 archive(byte) = "meta_conv.cmo"
 exists_if = "meta_conv.cma"
 
 package "syntax" (
- version = "1.0.0"
+ version = "1.0.1"
  description = "Syntax extension for meta_conv"
  requires = "camlp4 type_conv meta_conv"
  archive(syntax, preprocessor) = "pa_meta_conv.cma"

File lib/result.ml

 
 let catch_exn f = catch (fun ~fail -> try f () with e -> fail e)
 
-let from_Ok exn = function
-  | `Ok v -> v
-  | `Error e -> raise (exn e)
+let result errf okf = function
+  | `Ok v -> okf v
+  | `Error e -> errf e
 
 module Open = struct
   let (>>=) = (>>=)

File lib/result.mli

 val catch : (fail:('error -> 'exn) -> 'a) -> [> ('a, 'error) t ]
 val catch_exn : (unit -> 'a) -> [> ('a, exn) t ]
 
-val from_Ok : ('error -> exn) -> [< ('a, 'error) t] -> 'a
+val result : ('error -> 'b) -> ('a -> 'b) -> [< ('a, 'error) t] -> 'b
+(** same as Haskell's [either] *)  
 
 module Open : sig
   val (>>=) : ('a, 'error) t -> ('a -> ('b, 'error) t) -> ('b, 'error) t
-version = "1.0.0"
+version = "1.0.1"
 description = "ocaml_conv - type_conv, meta_conv based OCaml value printer"
 requires = "meta_conv,compiler-libs.common"
 archive(byte) = "ocaml_conv.cma"
 (* setup.ml generated for the first time by OASIS v0.3.0 *)
 
 (* OASIS_START *)
-(* DO NOT EDIT (digest: 91efa1b3aebfc5f86a2d76f958e9c2b0) *)
+(* DO NOT EDIT (digest: 8ba80a5b32f395a78996116134667100) *)
 (*
    Regenerated by OASIS v0.3.0
    Visit http://oasis.forge.ocamlcore.org for more information and
           ocaml_version = None;
           findlib_version = None;
           name = "meta_conv";
-          version = "1.0.0";
+          version = "1.0.1";
           license =
             OASISLicense.DEP5License
               (OASISLicense.DEP5Unit
           };
      oasis_fn = Some "_oasis";
      oasis_version = "0.3.0";
-     oasis_digest = Some "\131\245\1504\211F\232\130\192\237\185\t\228z\011^";
+     oasis_digest = Some "\228A|\2467\207\133k\225;\1897E1\182\218";
      oasis_exec = None;
      oasis_setup_args = [];
      setup_update = false;