123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687(** A type that represents values with two possibilities.
[Either] can be seen as a generic sum type, the dual of [Tuple]. [First] is neither
more important nor less important than [Second].
Many functions in [Either] focus on just one constructor. The [Focused] signature
abstracts over which constructor is the focus. To use these functions, use the
[First] or [Second] modules in [S]. *)open!ImportmoduletypeFocused=sigtype(+'focus,+'other)tincludeMonad.S2_localwithtype('a,'b)t:=('a,'b)tincludeApplicative.S2_localwithtype('a,'b)t:=('a,'b)tvalvalue:('a,_)t->default:'a->'avalto_option:('a,_)t->'aoptionvalwith_return:('aWith_return.return->'b)->('a,'b)tvalcombine:('a,'d)t->('b,'d)t->f:('a->'b->'c)->other:('d->'d->'d)->('c,'d)tvalcombine_all:('a,'b)tlist->f:('b->'b->'b)->('alist,'b)tvalcombine_all_unit:(unit,'b)tlist->f:('b->'b->'b)->(unit,'b)tendmoduletypeEither=sigtype('f,'s)t=('f,'s)Either0.t=|Firstof'f|Secondof's[@@deriving_inlinecompare~localize,hash,sexp,sexp_grammar]includePpx_compare_lib.Comparable.S2withtype('f,'s)t:=('f,'s)tincludePpx_compare_lib.Comparable.S_local2withtype('f,'s)t:=('f,'s)tincludePpx_hash_lib.Hashable.S2withtype('f,'s)t:=('f,'s)tincludeSexplib0.Sexpable.S2withtype('f,'s)t:=('f,'s)tvalt_sexp_grammar:'fSexplib0.Sexp_grammar.t->'sSexplib0.Sexp_grammar.t->('f,'s)tSexplib0.Sexp_grammar.t[@@@end]includeInvariant.S2withtype('a,'b)t:=('a,'b)tvalswap:('f,'s)t->('s,'f)tvalvalue:('a,'a)t->'avaliter:('a,'b)t->first:('a->unit)->second:('b->unit)->unitvalvalue_map:('a,'b)t->first:('a->'c)->second:('b->'c)->'cvalmap:('a,'b)t->first:('a->'c)->second:('b->'d)->('c,'d)tvalequal:('f->'f->bool)->('s->'s->bool)->('f,'s)t->('f,'s)t->boolvallocal_equal:('f->'f->bool)->('s->'s->bool)->('f,'s)t->('f,'s)t->boolmoduletypeFocused=FocusedmoduleFirst:Focusedwithtype('a,'b)t=('a,'b)tmoduleSecond:Focusedwithtype('a,'b)t=('b,'a)tvalis_first:(_,_)t->boolvalis_second:(_,_)t->bool(** [first] and [second] are [First.return] and [Second.return]. *)valfirst:'f->('f,_)tvalsecond:'s->(_,'s)t(**/**)moduleExport:sigtype('f,'s)_either=('f,'s)t=|Firstof'f|Secondof'sendend