From 8309a98096facfba448c9d8d298ba3903145831a Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Thu, 15 Jan 2015 18:45:27 +0530 Subject: Correct restriction of vm_compute when handling universe polymorphic definitions. Instead of failing with an anomaly when trying to do conversion or computation with the vm's, consider polymorphic constants as being opaque and keep instances around. This way the code is still correct but (obviously) incomplete for polymorphic definitions and we avoid introducing an anomaly. The patch does nothing clever, it only keeps around instances with constants/inductives and compile constant bodies only for non-polymorphic definitions. --- theories/Program/Basics.v | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'theories/Program') diff --git a/theories/Program/Basics.v b/theories/Program/Basics.v index 4bc29a071..e5be0ca92 100644 --- a/theories/Program/Basics.v +++ b/theories/Program/Basics.v @@ -15,8 +15,6 @@ Institution: LRI, CNRS UMR 8623 - University Paris Sud *) -(* Set Universe Polymorphism. *) - (** The polymorphic identity function is defined in [Datatypes]. *) Arguments id {A} x. @@ -47,7 +45,7 @@ Definition const {A B} (a : A) := fun _ : B => a. (** The [flip] combinator reverses the first two arguments of a function. *) -Monomorphic Definition flip {A B C} (f : A -> B -> C) x y := f y x. +Definition flip {A B C} (f : A -> B -> C) x y := f y x. (** Application as a combinator. *) -- cgit v1.2.3