diff options
| author | Matthieu Sozeau | 2017-07-27 16:10:49 +0200 |
|---|---|---|
| committer | Matthieu Sozeau | 2019-02-08 10:52:39 +0100 |
| commit | 46b671c7473385ec7747a796e85b3cf704d000c6 (patch) | |
| tree | 7f340874881d5c2d266f1f39de145bd7d95af49c /engine/evd.ml | |
| parent | d1d32f552064b9907fc9815b7412b9a9cde4a0dd (diff) | |
Evd/evarsolve: add an abstraction field to evars for unification
Named evar_abstract_arguments, this field indicates if the evar
arguments corresponding to certain hypothesis can be immitated during
inversion or not. If the argument comes from an abstraction (the evar
was of arrow type), then imitation is disallowed as it gives unnatural
solutions, and lambda abstraction is preferred.
Diffstat (limited to 'engine/evd.ml')
| -rw-r--r-- | engine/evd.ml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engine/evd.ml b/engine/evd.ml index eee2cb700c..2d28892e6e 100644 --- a/engine/evd.ml +++ b/engine/evd.ml @@ -126,6 +126,15 @@ struct end +module Abstraction = struct + + type t = bool list + + let identity = [] + + let abstract_last l = true :: l +end + (* The kinds of existential variables are now defined in [Evar_kinds] *) (* The type of mappings for existential variables *) @@ -143,6 +152,7 @@ type evar_info = { evar_hyps : named_context_val; evar_body : evar_body; evar_filter : Filter.t; + evar_abstract_arguments : Abstraction.t; evar_source : Evar_kinds.t Loc.located; evar_candidates : constr list option; (* if not None, list of allowed instances *)} @@ -151,6 +161,7 @@ let make_evar hyps ccl = { evar_hyps = hyps; evar_body = Evar_empty; evar_filter = Filter.identity; + evar_abstract_arguments = Abstraction.identity; evar_source = Loc.tag @@ Evar_kinds.InternalHole; evar_candidates = None; } |
