summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Campbell2018-06-20 14:40:23 +0100
committerBrian Campbell2018-06-20 18:21:27 +0100
commit38ba8e269bbce49cbcb0c09205a9f11df8a538f6 (patch)
tree5cfa475609b98b1e0c7139e942defc80da8536b0 /src
parent45c062939ffcdb423774ed1af5266f9b779b2c6a (diff)
Coq: add missing existential projection on simple let expressions
Diffstat (limited to 'src')
-rw-r--r--src/pretty_print_coq.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pretty_print_coq.ml b/src/pretty_print_coq.ml
index 2e07dea7..e9deaea2 100644
--- a/src/pretty_print_coq.ml
+++ b/src/pretty_print_coq.ml
@@ -1140,7 +1140,8 @@ let doc_exp_lem, doc_let_lem =
and let_exp ctxt (LB_aux(lb,_)) = match lb with
(* Prefer simple lets over patterns, because I've found Coq can struggle to
work out return types otherwise *)
- | LB_val(P_aux (P_id id,_),e) ->
+ | LB_val(P_aux (P_id id,_),e)
+ when Util.is_none (is_auto_decomposed_exist (env_of e) (typ_of e)) ->
prefix 2 1
(separate space [string "let"; doc_id id; coloneq])
(top_exp ctxt false e)