1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495(** 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[@local])->'b)[@local])->('a,'b)tvalcombine:('a,'d)t->('b,'d)t->f:(('a->'b->'c)[@local])->other:(('d->'d->'d)[@local])->('c,'d)tvalcombine_all:('a,'b)tlist->f:(('b->'b->'b)[@local])->('alist,'b)tvalcombine_all_unit:(unit,'b)tlist->f:(('b->'b->'b)[@local])->(unit,'b)tendmoduletypeEither=sigtype('f,'s)t=('f,'s)Either0.t=|Firstof'f|Secondof's[@@deriving_inlinecompare,hash,sexp,sexp_grammar]includePpx_compare_lib.Comparable.S2withtype('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)[@local])->second:(('b->unit)[@local])->unitvalvalue_map:('a,'b)t->first:(('a->'c)[@local])->second:(('b->'c)[@local])->'cvalmap:('a,'b)t->first:(('a->'c)[@local])->second:(('b->'d)[@local])->('c,'d)tvalequal:('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