aboutsummaryrefslogtreecommitdiff
path: root/toplevel
diff options
context:
space:
mode:
authorMaxime Dénès2014-04-21 00:18:55 -0400
committerMaxime Dénès2014-07-22 17:55:06 -0400
commitb828495753da8f1685e7ca5b6897a580e7bd3f09 (patch)
treec71ec56671b95721aa5ea3975fad5f07f3c9fd61 /toplevel
parent4cd0becc84208525443d7ca4e9cc8214d00df319 (diff)
First attempt at a fix for guard condition on cofixpoints.
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/himsg.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/toplevel/himsg.ml b/toplevel/himsg.ml
index 16d3240294..a0a3d947ed 100644
--- a/toplevel/himsg.ml
+++ b/toplevel/himsg.ml
@@ -425,6 +425,10 @@ let explain_ill_formed_rec_body env err names i fixenv vdefj =
str "Sub-expression " ++ pr_lconstr_env env c ++
strbrk " not in guarded form (should be a constructor," ++
strbrk " an abstraction, a match, a cofix or a recursive call)"
+ | ReturnPredicateNotCoInductive c ->
+ str "The return clause of the following pattern matching should be" ++
+ strbrk "a coinductive type:" ++
+ spc () ++ pr_lconstr_env env c
in
prt_name i ++ str " is ill-formed." ++ fnl () ++
pr_ne_context_of (str "In environment") env ++