Typgesteuertes Generieren von Werten

class Testable t where ...

test :: Testable t => t -> IO ()

instance Testable Bool where ...

instance ( Serial a, Testable b ) 
      => Testable ( a -> b ) where ...

test ( \ (xs :: [Bool] ) -> 
         xs == reverse ( reverse xs ) )
erfordert in ghci: :set -XPatternSignatures



Johannes Waldmann 2011-01-18