functor (M : MonadError->
  sig
    type ('a, 'b) withres = { cons : '-> 'M.m; fin : '-> unit M.m; }
    val bindres : ('a, 'b) WithM.??.withres -> '-> ('-> 'M.m) -> 'M.m
    val with_alt :
      ('a, 'b) WithM.??.withres ->
      ('c, 'b) WithM.??.withres ->
      ('a * 'c, exn option * 'b) WithM.??.withres
    val with_identity : ('a, 'a) WithM.??.withres
    val premap :
      ('-> 'b) -> ('b, 'c) WithM.??.withres -> ('a, 'c) WithM.??.withres
    type dir_abstract
    val with_sys_chdir : (string, WithM.??.dir_abstract) WithM.??.withres
  end