From 2ddde6d6ca5f58760070d7f6e96854d50df61903 Mon Sep 17 00:00:00 2001 From: Lars Kuhtz Date: Wed, 16 Oct 2013 11:42:59 -0700 Subject: [PATCH] TypeLevel.Number.Nat: fix bad instance for Add0Bit --- TypeLevel/Number/Nat.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TypeLevel/Number/Nat.hs b/TypeLevel/Number/Nat.hs index 225c4fa..62fbd82 100644 --- a/TypeLevel/Number/Nat.hs +++ b/TypeLevel/Number/Nat.hs @@ -198,7 +198,8 @@ instance (Nat (I n)) => Reify (I n) Int64 where witness = Witness $ toInt (undef -- equal to zero. Actual normalization is done here. type family Add0Bit n :: * type instance Add0Bit Z = Z -type instance Add0Bit (a b) = (O (a b)) +type instance Add0Bit (O n) = (O (O n)) +type instance Add0Bit (I n) = (O (I n)) type instance Normalized Z = Z type instance Normalized (I n) = I (Normalized n)