mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-07 11:45:31 -05:00
use result package for retrocompat
This commit is contained in:
parent
e9de0a8902
commit
7e8c7235bc
1 changed files with 6 additions and 6 deletions
|
|
@ -148,16 +148,16 @@ let of_list = function
|
|||
| [] -> None
|
||||
|
||||
let to_result err = function
|
||||
| None -> Error err
|
||||
| Some x -> Ok x
|
||||
| None -> Result.Error err
|
||||
| Some x -> Result.Ok x
|
||||
|
||||
let to_result_lazy err_fn = function
|
||||
| None -> Error (err_fn ())
|
||||
| Some x -> Ok x
|
||||
| None -> Result.Error (err_fn ())
|
||||
| Some x -> Result.Ok x
|
||||
|
||||
let of_result = function
|
||||
| Error _ -> None
|
||||
| Ok x -> Some x
|
||||
| Result.Error _ -> None
|
||||
| Result.Ok x -> Some x
|
||||
|
||||
module Infix = struct
|
||||
let (>|=) = (>|=)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue