[Haskell-cafe] Re: Embedding newlines into a string?

Neil Mitchell ndmitchell at gmail.com
Mon Apr 14 05:23:20 EDT 2008


> > mapM_ putStrLn == putStr . unlines
> >
>  I'm wondering which (==) you mean here ;)

Expression equality, defined by:

instance (Arbitrary a, Eq b) => Eq (a -> b) where
    f == g = forall x :: a, f x == g x

Using QuickCheck to generate the values, and an Eq over IO (), which
can be defined using the IO test modelling thing at last years Haskell

There are answers to all these things, even if Haskell can't express
all of them quite like this :)



More information about the Haskell-Cafe mailing list