reason-tools icon indicating copy to clipboard operation
reason-tools copied to clipboard

Feature Request - monadic blocks

Open strega-nil opened this issue 8 years ago • 2 comments

I'd like to be able to write something like

      get_structural_ty(lhs, ty_names)
      >>= (lhs) => get_structural_ty(rhs, ty_names)
      >>= (rhs) => pure(Ty_lam(lhs, rhs))

however, when refmt is run on this code, it turns out like

      get_structural_ty(lhs, ty_names)
      >>= ((lhs) => get_structural_ty(rhs, ty_names) >>= ((rhs) => pure(Ty_lam(lhs, rhs))))

which is quite a bit less readable.

strega-nil avatar Nov 25 '17 22:11 strega-nil

Is this reason-tools specific? Or does it happen with refmt in your editor/cli as well? If the later, we should upstream this request to reason repo.

rickyvetter avatar Dec 03 '17 22:12 rickyvetter

it happens with refmt in my editor, yeah.

strega-nil avatar Dec 03 '17 22:12 strega-nil