summaryrefslogtreecommitdiff
path: root/typing/oprint.ml
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2011-12-20 11:27:06 +0000
committerAlain Frisch <alain@frisch.fr>2011-12-20 11:27:06 +0000
commitcf9c1a623c9ac8b84a503a2ebbf947bdaea25eb1 (patch)
treee3dd2b44848f8f2e375e98a89d67cf0d433e1d23 /typing/oprint.ml
parent16c26c6de340ac531acf07486c378665c8aa4d97 (diff)
downloadocaml-cf9c1a623c9ac8b84a503a2ebbf947bdaea25eb1.tar.gz
Fix pretty-printing of let-like operators.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11895 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'typing/oprint.ml')
-rw-r--r--typing/oprint.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/typing/oprint.ml b/typing/oprint.ml
index 21ef160806..fa5f458709 100644
--- a/typing/oprint.ml
+++ b/typing/oprint.ml
@@ -32,9 +32,9 @@ let parenthesized_ident name =
(List.mem name ["or"; "mod"; "land"; "lor"; "lxor"; "lsl"; "lsr"; "asr"])
||
(match name.[0] with
- 'a'..'z' | 'A'..'Z' | '\223'..'\246' | '\248'..'\255' | '_' ->
- false
- | _ -> true)
+ | 'l' when String.length name > 3 && String.sub name 0 3 = "let" -> true
+ | 'a'..'z' | 'A'..'Z' | '\223'..'\246' | '\248'..'\255' | '_' -> false
+ | _ -> true)
let value_ident ppf name =
if parenthesized_ident name then