diff options
Diffstat (limited to 'toplevel')
| -rw-r--r-- | toplevel/class.ml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/toplevel/class.ml b/toplevel/class.ml index a6591f0d3b..6e95a930d0 100644 --- a/toplevel/class.ml +++ b/toplevel/class.ml @@ -96,7 +96,9 @@ let uniform_cond nargs lt = aux (nargs,lt) let class_of_global = function - | ConstRef sp -> CL_CONST sp + | ConstRef sp -> + if Environ.is_projection sp (Global.env ()) + then CL_PROJ sp else CL_CONST sp | IndRef sp -> CL_IND sp | VarRef id -> CL_SECVAR id | ConstructRef _ as c -> @@ -140,7 +142,11 @@ let get_target t ind = if (ind > 1) then CL_FUN else - pi1 (find_class_type Evd.empty t) + match pi1 (find_class_type Evd.empty t) with + | CL_CONST p when Environ.is_projection p (Global.env ()) -> + CL_PROJ p + | x -> x + let prods_of t = let rec aux acc d = match kind_of_term d with |
