1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980open!CoremoduletypeIo=sigtype'attype'afmttypeout_channelincludeMonad.Swithtype'at:='atvaloutput_string:out_channel->string->unitvaloutput:out_channel->buf:bytes->pos:int->len:int->unitvalstderr:out_channelvalstdout:out_channelvalflush:out_channel->unittvalprint_string:string->unitvalfprintf:attrs:string->out_channel->'afmt->'avalfold_left:'aList.t->init:'b->f:('b->'a->'bt)->'btvalstdout_isatty:unit->booltvalcapable:unit->booltendmoduletypeS=sigtype'aiotype'aio_fmttypeout_channel(** Handling of ansi codes. *)moduleAnsi:sigvalkill_line:unit->unitvalerase_to_end_of_screen:unit->unitvalerase_to_start_of_screen:unit->unitvalerase_all:unit->unitvalbell:unit->unitvalhome_cursor:unit->unitvalcursor_up:unit->unitvalcursor_down:unit->unitvalcursor_backward:unit->unitvalcursor_forward:unit->unitvalsave_cursor:unit->unitvalunsave_cursor:unit->unittypeattr=Ansi_kernel.Attr.tvalprintf:attrlist->'aio_fmt->'avaleprintf:attrlist->'aio_fmt->'avaloutput_string:attrlist->out_channel->string->unitiovaloutput:attrlist->out_channel->Bytes.t->int->int->unitio(* Create string with embedded formatting codes *)valstring_with_attr:attrlist->string->stringendvalis_color_tty:unit->boolio(** The width in characters of the current output. Returns [`Not_a_tty] if
stdout is not connected to a tty.*)valwidth:unit->[`Colsofint|`Not_a_tty|`Not_available]io(** print a list in a columnize way (like the output of ls) *)valprint_list:out_channel->(string*Ansi.attrlist)list->unitioend(** Color printing in terminals *)moduletypeConsole=sigmoduletypeIo=IomoduletypeS=SmoduleMake(Io:Io):Swithtype'aio:='aIo.tandtype'aio_fmt:='aIo.fmtandtypeout_channel:=Io.out_channelincludeSwithtype'aio:='aandtype'aio_fmt:=('a,Out_channel.t,unit)formatandtypeout_channel:=Out_channel.tend