From 4c2a27189804ebcf59bc2c2c91bcac970b6e7df7 Mon Sep 17 00:00:00 2001 From: Sander Spies Date: Fri, 5 Jun 2020 11:32:30 +0200 Subject: [PATCH] Fix small printing bug. --- src/passes/1-parser/reasonligo/Pretty.ml | 4 +++- src/test/contracts/expected/pledge.religo | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/passes/1-parser/reasonligo/Pretty.ml b/src/passes/1-parser/reasonligo/Pretty.ml index 1ac0371c4..495c6fdbc 100644 --- a/src/passes/1-parser/reasonligo/Pretty.ml +++ b/src/passes/1-parser/reasonligo/Pretty.ml @@ -79,7 +79,9 @@ and pp_pconstr = function and pp_patt_c_app {value; _} = match value with constr, None -> pp_ident constr - | constr, Some pat -> + | constr, Some (PVar _ as pat) -> + prefix 2 1 (pp_ident constr) (pp_pattern pat) + | constr, Some (_ as pat)-> prefix 2 0 (pp_ident constr) (pp_pattern pat) and pp_patt_some {value; _} = diff --git a/src/test/contracts/expected/pledge.religo b/src/test/contracts/expected/pledge.religo index a8ef96c34..0bac36b18 100644 --- a/src/test/contracts/expected/pledge.religo +++ b/src/test/contracts/expected/pledge.religo @@ -31,6 +31,6 @@ let main = { switch(p) { | Donate => donate(((), s)) - | Distributemsg => distribute((msg, s)) + | Distribute msg => distribute((msg, s)) } };