`type 'a result = Ok of 'a | Error of 'b` in Pervasives
(Yaron Minsky) To whoever reads commit messages: the consensus on this change is weak, which means the opinions can still evolve with experience using the feature or seeing which external packages it affects. It is not impossible that the change be reverted before a 4.03 release. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16011 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
90061455e6
commit
19a5d5eb50
2
Changes
2
Changes
|
@ -122,6 +122,8 @@ Features wishes:
|
|||
- GPR#137: add untypeast.ml (in open recursion style) to compiler-libs
|
||||
(Gabriel Radanne)
|
||||
- GPR#142: add a CAMLdrop macro for undoing CAMLparam*/CAMLlocal*
|
||||
- GPR#147: [type 'a result = Ok of 'a | Error of 'b] in Pervasives
|
||||
(Yaron Minsky)
|
||||
|
||||
OCaml 4.02.2:
|
||||
-------------
|
||||
|
|
|
@ -210,6 +210,10 @@ external ( := ) : 'a ref -> 'a -> unit = "%setfield0"
|
|||
external incr : int ref -> unit = "%incr"
|
||||
external decr : int ref -> unit = "%decr"
|
||||
|
||||
(* Result type *)
|
||||
|
||||
type ('a,'b) result = Ok of 'a | Error of 'b
|
||||
|
||||
(* String conversion functions *)
|
||||
|
||||
external format_int : string -> int -> string = "caml_format_int"
|
||||
|
|
|
@ -206,6 +206,10 @@ external ( := ) : 'a ref -> 'a -> unit = "%setfield0"
|
|||
external incr : int ref -> unit = "%incr"
|
||||
external decr : int ref -> unit = "%decr"
|
||||
|
||||
(* Result type *)
|
||||
|
||||
type ('a,'b) result = Ok of 'a | Error of 'b
|
||||
|
||||
(* String conversion functions *)
|
||||
|
||||
external format_int : string -> int -> string = "caml_format_int"
|
||||
|
|
|
@ -966,6 +966,9 @@ external decr : int ref -> unit = "%decr"
|
|||
(** Decrement the integer contained in the given reference.
|
||||
Equivalent to [fun r -> r := pred !r]. *)
|
||||
|
||||
(** {6 Result type} *)
|
||||
|
||||
type ('a,'b) result = Ok of 'a | Error of 'b
|
||||
|
||||
(** {6 Operations on format strings} *)
|
||||
|
||||
|
|
Loading…
Reference in New Issue