Commits

larskuhtz committed 305c69e

TypeLevel.Number.Nat: fix bad instance for Add0Bit

Comments (0)

Files changed (1)

TypeLevel/Number/Nat.hs

 -- 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)