[commit: base] master: Declare a family for subtraction. (5334361)
Iavor Diatchki
diatchki at galois.com
Mon Nov 12 03:23:53 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/533436192c78b7d2352c9d3f5689c4f24dc0920f
>---------------------------------------------------------------
commit 533436192c78b7d2352c9d3f5689c4f24dc0920f
Author: Iavor S. Diatchki <iavor.diatchki at gmail.com>
Date: Sun Nov 11 18:23:47 2012 -0800
Declare a family for subtraction.
>---------------------------------------------------------------
GHC/TypeLits.hs | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/GHC/TypeLits.hs b/GHC/TypeLits.hs
index 4db4cbb..b8733ca 100644
--- a/GHC/TypeLits.hs
+++ b/GHC/TypeLits.hs
@@ -27,6 +27,7 @@ module GHC.TypeLits
-- * Functions on type nats
, type (<=), type (<=?), type (+), type (*), type (^)
+ , type (-)
-- * Destructing type-nat singletons.
, isZero, IsZero(..)
@@ -106,6 +107,10 @@ type family (m :: Nat) * (n :: Nat) :: Nat
-- | Exponentiation of type-level naturals.
type family (m :: Nat) ^ (n :: Nat) :: Nat
+-- | Subtraction of type-level naturals.
+-- Note that this operation is unspecified for some inputs.
+type family (m :: Nat) - (n :: Nat) :: Nat
+
--------------------------------------------------------------------------------
More information about the Cvs-libraries
mailing list