Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/d0e0ace6500784bc8714ae070c1b0c625f71d732

>---------------------------------------------------------------

commit d0e0ace6500784bc8714ae070c1b0c625f71d732
Author: Iavor S. Diatchki <[email protected]>
Date:   Mon Apr 30 23:08:54 2012 -0700

    Add a type-family for comparing numbers.
    
    For the moment, this replaces the class (<=) because it is
    easier to fit with GHC's coercion evidence.

>---------------------------------------------------------------

 GHC/TypeLits.hs |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/GHC/TypeLits.hs b/GHC/TypeLits.hs
index 984fd39..8b4e13b 100644
--- a/GHC/TypeLits.hs
+++ b/GHC/TypeLits.hs
@@ -23,7 +23,7 @@ module GHC.TypeLits
   , withSing, singThat
 
     -- * Functions on type nats
-  , type (<=), type (+), type (*), type (^)
+  , type (<=), type (<=?), type (+), type (*), type (^)
 
     -- * Destructing type-nats.
   , isZero, IsZero(..)
@@ -76,6 +76,8 @@ class SingI a where
 -- | Comparsion of type-level naturals.
 class (m :: Nat) <= (n :: Nat)
 
+type family (m :: Nat) <=? (n :: Nat) :: Bool
+
 -- | Addition of type-level naturals.
 type family (m :: Nat) + (n :: Nat) :: Nat
 



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to