This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/unix/lwt_unix.cppo.ml b/src/unix/lwt_unix.cppo.ml | |
index 89bb84228..69ef1a45d 100644 | |
--- a/src/unix/lwt_unix.cppo.ml | |
+++ b/src/unix/lwt_unix.cppo.ml | |
@@ -1543,29 +1543,48 @@ let getpwnam name = | |
else | |
run_job (getpwnam_job name) | |
-external getgrnam_job : string -> Unix.group_entry job = "lwt_unix_getgrnam_job" | |
+let retry_after_erange name trying = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module type POSSIBLES = sig | |
(* A monad to simulate all possible outcomes of a non-deterministic | |
* operation with discrete outcomes such as dice rolling. *) | |
type 'a t | |
(** [return x] is the possible outcomes for an operation where [x] is the | |
* only possible outcome. *) | |
val return: 'a -> 'a t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(*/!\ known bugs and shortcomings: | |
- lacks integer overflow check, | |
- lacks sign parsing (can't parse negative ints) | |
- exceptions are not helpfull | |
- code is ugly | |
- should benchmark parse_int against parse_int_ | |
*) | |
let int_of_char c = match c with |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module type MESSAGE = | |
sig | |
type obj | |
type variant | |
val make : unit -> obj | |
(* encapsulate object in a variant type *) | |
val convert : obj -> variant | |
val print : obj -> unit | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ocamlc x.ml | |
File "x.ml", line 30, characters 16-28: | |
Error: Unbound value Rep.dispatch |