Indenting let open Mod in

237 views Asked by At

Is there a way to get this kind of layout from TypeRex?

let alert ctx x = 
  let open Alert in
  Printf.printf "...Alert: type = %s, status = %s\n"
    (Type.to_string (type_ x)) (status x);
  flush stdout

I end up with this instead which to me looks suboptimal

let alert ctx x = 
  let open Alert in
      Printf.printf "...Alert: type = %s, status = %s\n"
        (Type.to_string (type_ x)) (status x);
      flush stdout
1

There are 1 answers

0
Çağdaş Bozman On BEST ANSWER

Typerex does not implement indentation yet. We are still using tuareg-mode's indentation, but a reimplementation is planed.