on master help sign in
Merge pull request #783 from tpsinnem/master

Make Decidable.Decidable and Decidable.Order available with a little fix

commite4d99ee5ff5cce7ffd6be82841f32a3cf1803cdf authorEdwin Brady <edwin.brady@gmail.com> dateSat 18 Jan 2014, 11:31 (13 years ago) parentb870fb4efc5e25
2 files changed+6−13
libs/base/Decidable/Decidable.idr+4−6 libs/base/Decidable/Order.idr+2−7
libs/base/Decidable/Decidable.idr+4−6
@@ -6,19 +6,17 @@ module Decidable.Decidable
66-- Typeclass for decidable n-ary Relations
77--------------------------------------------------------------------------------
88
9−{-
10−This can't work yet! The class parameters must appear in the method type
11−signatures otherwise when defining the instances class resolution doesn't
12−have any clues...
9+--This can't work yet! The class parameters must appear in the method type
10+--signatures otherwise when defining the instances class resolution doesn't
11+--have any clues...
1312
1413using (t : Type)
1514 class Rel (p : t) where
1615 total liftRel : (Type -> Type) -> Type
1716
1817 class (Rel p) => Decidable (p : t) where
19− total decide : liftRel Dec
18+ total decide : liftRel {p=p} Dec
2019
2120using (P : Type, p : P)
2221 data Given : Dec P -> Type where
2322 always : Given (Yes p)
24−-}
libs/base/Decidable/Order.idr+2−7
@@ -1,13 +1,10 @@
11module Decidable.Order
22
3−%access public
4−
5−{-
6−Doesn't work yet, see note in Decidable.idr
7−
83import Decidable.Decidable
94import Decidable.Equality
105
6+%access public
7+
118--------------------------------------------------------------------------------
129-- Utility Lemmas
1310--------------------------------------------------------------------------------
@@ -83,5 +80,3 @@ instance Decidable NatLTE where
8380lte : (m : Nat) -> (n : Nat) -> Dec (NatLTE m n)
8481lte m n = decide {p = NatLTE} m n
8582
86−-}
87−