[commit: base] type-nats: Fix the type of IsEven (727d63c)
Iavor Diatchki
diatchki at galois.com
Thu Mar 22 04:17:35 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : type-nats
http://hackage.haskell.org/trac/ghc/changeset/727d63c98e76f3a71b0e29ff5384a392a7bc6c36
>---------------------------------------------------------------
commit 727d63c98e76f3a71b0e29ff5384a392a7bc6c36
Author: Iavor S. Diatchki <iavor.diatchki at gmail.com>
Date: Wed Mar 21 20:17:29 2012 -0700
Fix the type of IsEven
>---------------------------------------------------------------
GHC/TypeLits.hs | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/GHC/TypeLits.hs b/GHC/TypeLits.hs
index 06c05e2..cbbd015 100644
--- a/GHC/TypeLits.hs
+++ b/GHC/TypeLits.hs
@@ -174,8 +174,8 @@ instance Show (IsZero n) where
data IsEven :: Nat -> * where
IsEvenZero :: IsEven 0
- IsEven :: !(TNat (n+1)) -> IsEven (2 * (n + 1))
- IsOdd :: !(TNat n) -> IsEven (2 * n + 1)
+ IsEven :: !(TNat n) -> IsEven (2 * n + 2)
+ IsOdd :: !(TNat n) -> IsEven (2 * n + 1)
isEven :: TNat n -> IsEven n
isEven (TNat n) | n == 0 = unsafeCoerce IsEvenZero
More information about the Cvs-libraries
mailing list