aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Dénès2015-02-13 14:36:18 +0100
committerMaxime Dénès2015-02-13 14:36:18 +0100
commitdcb23edad4debc0f4856580910cb5eba00077006 (patch)
tree85718e43abd3b791bd6de478196b39531db7230b
parentdc9b65741dae1b2bf58394e26c9155dad2bf7591 (diff)
Better error message for nested module application.
Fixes #3809.
-rw-r--r--toplevel/himsg.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/toplevel/himsg.ml b/toplevel/himsg.ml
index 9341f2f70a..5429e6608d 100644
--- a/toplevel/himsg.ml
+++ b/toplevel/himsg.ml
@@ -879,7 +879,9 @@ let explain_label_already_declared l =
str ("The label "^Label.to_string l^" is already declared.")
let explain_application_to_not_path _ =
- str "Application of modules is restricted to paths."
+ strbrk "A module cannot be applied to another module application or " ++
+ strbrk "with-expression; you must give a name to the intermediate result " ++
+ strbrk "module first."
let explain_not_a_functor () =
str "Application of a non-functor."