prelude.ml
biotk
biotk.croquis
biotk.pipes
biotk_pipes_unix
1 2 3 4 5 6 7 8 9 10 type 'a or_error = ('a, [`Msg of string]) result module Error = struct let msg s = Error (`Msg s) let msgf fmt = Printf.ksprintf msg fmt end let ok_or_failwith = function | Ok x -> x | Error (`Msg m) -> failwith m
1 2 3 4 5 6 7 8 9 10
type 'a or_error = ('a, [`Msg of string]) result module Error = struct let msg s = Error (`Msg s) let msgf fmt = Printf.ksprintf msg fmt end let ok_or_failwith = function | Ok x -> x | Error (`Msg m) -> failwith m