Decoders.Decoder
type ('i, 'o) t = 'i -> ( 'o, 'i Error.t ) Stdlib.result
An ('i, 'o) t
is a decoder that
'i
'o
or an error of type 'i Error.t
val pure : 'o -> ( 'i, 'o ) t
pure x
always succeeds with x
val fail : string -> ( 'i, 'o ) t
fail msg
always fails with msg
, capturing the error context from 'i
val of_result : ( 'o, 'i Error.t ) Util.My_result.t -> ( 'i, 'o ) t
module Infix : sig ... end
val value : ( 'i, 'i ) t