decoders
Elm-inspired decoders for Ocaml
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
An ('i, 'o) t
is a decoder that
- consumes a value of type
'i
- produces a value of type
'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