diff options
author | Gregory Malecha <gmalecha@cs.harvard.edu> | 2015-06-24 09:30:31 +0200 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2015-06-24 13:30:33 +0200 |
commit | 1343b69221ce3eeb3154732e73bbdc0044b224a8 (patch) | |
tree | 9db5283af41912c241970a5346784df98f4cb917 | |
parent | d3dabb87cace5a020bc11f6026a371b0cc86d7e9 (diff) |
Add a space in cast since cast binds loosely.
Fixes bug 3936
This closes #73
-rw-r--r-- | printing/ppconstr.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/printing/ppconstr.ml b/printing/ppconstr.ml index d9d8af66b..650b8f726 100644 --- a/printing/ppconstr.ml +++ b/printing/ppconstr.ml @@ -676,11 +676,11 @@ end) = struct return (pr_glob_sort s, latom) | CCast (_,a,b) -> return ( - hv 0 (pr mt (lcast,L) a ++ cut () ++ + hv 0 (pr mt (lcast,L) a ++ spc () ++ match b with - | CastConv b -> str ":" ++ pr mt (-lcast,E) b - | CastVM b -> str "<:" ++ pr mt (-lcast,E) b - | CastNative b -> str "<<:" ++ pr mt (-lcast,E) b + | CastConv b -> str ":" ++ ws 1 ++ pr mt (-lcast,E) b + | CastVM b -> str "<:" ++ ws 1 ++ pr mt (-lcast,E) b + | CastNative b -> str "<<:" ++ ws 1 ++ pr mt (-lcast,E) b | CastCoerce -> str ":>"), lcast ) |