diff options
| author | Brian Campbell | 2017-12-07 11:10:50 +0000 |
|---|---|---|
| committer | Brian Campbell | 2017-12-07 11:10:50 +0000 |
| commit | 691efa994a72d0e9cdbcdfcc4d6a9b1976d91e2b (patch) | |
| tree | 5f5a31d4d6632e1283c3916b403de6adacc3e701 /src/pretty_print_sail.ml | |
| parent | e36e7e0e5068abc31b69831d98138ee5d1e541da (diff) | |
Resolve function clause guard parsing ambiguity by requiring parentheses
Diffstat (limited to 'src/pretty_print_sail.ml')
| -rw-r--r-- | src/pretty_print_sail.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pretty_print_sail.ml b/src/pretty_print_sail.ml index 68f414b3..3868502b 100644 --- a/src/pretty_print_sail.ml +++ b/src/pretty_print_sail.ml @@ -490,7 +490,7 @@ let doc_funcl (FCL_aux(FCL_Funcl(id,pexp),_)) = | Pat_aux (Pat_exp (pat,exp),_) -> group (doc_op equals (separate space [doc_id id; doc_atomic_pat pat]) (doc_exp exp)) | Pat_aux (Pat_when (pat,wh,exp),_) -> - group (doc_op equals (separate space [doc_id id; doc_atomic_pat pat; string "when"; doc_exp wh]) + group (doc_op equals (doc_id id ^^ space ^^ parens (separate space [doc_atomic_pat pat; string "when"; doc_exp wh])) (doc_exp exp)) let doc_fundef (FD_aux(FD_function(r, typa, efa, fcls),_)) = |
