[Added Typeable instance. Noted that Data instance breaks abstraction. Nils Anders Danielsson **20050604162411] { hunk ./Test/ChasingBottoms/Nat.hs 24 +import Data.Typeable hunk ./Test/ChasingBottoms/Nat.hs 29 -newtype Nat = Nat { nat2int :: Integer } deriving (Eq, Ord) +-- +-- No 'Data.Generics.Basics.Data' instance is provided since the +-- implementation should be abstract. + +-- Could add 'Data.Generics.Basics.Data' instance based on unary +-- representation of natural numbers, but that would lead to +-- inefficiencies. +newtype Nat = Nat { nat2int :: Integer } deriving (Eq, Ord, Typeable) hunk ./Test/ChasingBottoms/Nat/Tests.hs 3 --- | Tests of the functions in "Test.ChasingBottoms.Nat". +-- | Tests for "Test.ChasingBottoms.Nat". + +-- The automatically derived 'Typeable' instance is not tested. }