comparison src/Subset.v @ 89:939add5a7db9

Remove -impredicative-set
author Adam Chlipala <adamc@hcoop.net>
date Tue, 07 Oct 2008 10:49:07 -0400
parents 15e2b3485dc4
children cbf2f74a5130
comparison
equal deleted inserted replaced
88:cde1351d18bb 89:939add5a7db9
426 426
427 (** * Partial Subset Types *) 427 (** * Partial Subset Types *)
428 428
429 (** Our final implementation of dependent predecessor used a very specific argument type to ensure that execution could always complete normally. Sometimes we want to allow execution to fail, and we want a more principled way of signaling that than returning a default value, as [pred] does for [0]. One approach is to define this type family [maybe], which is a version of [sig] that allows obligation-free failure. *) 429 (** Our final implementation of dependent predecessor used a very specific argument type to ensure that execution could always complete normally. Sometimes we want to allow execution to fail, and we want a more principled way of signaling that than returning a default value, as [pred] does for [0]. One approach is to define this type family [maybe], which is a version of [sig] that allows obligation-free failure. *)
430 430
431 Inductive maybe (A : Type) (P : A -> Prop) : Set := 431 Inductive maybe (A : Set) (P : A -> Prop) : Set :=
432 | Unknown : maybe P 432 | Unknown : maybe P
433 | Found : forall x : A, P x -> maybe P. 433 | Found : forall x : A, P x -> maybe P.
434 434
435 (** We can define some new notations, analogous to those we defined for subset types. *) 435 (** We can define some new notations, analogous to those we defined for subset types. *)
436 436