[Haskell-cafe] Reading showables

Thomas Hartman tphyahoo at gmail.com
Sun Dec 7 08:39:44 EST 2008


One more thing.

  If your Read/Show instances are created by

data (or newtype) ...
  deriving (Read,Show)

then read . show will do the right thing.

Thomas.

Am 7. Dezember 2008 14:11 schrieb John Ky <newhoggy at gmail.com>:
> Hi,
>
> Is there a way to read Showables?
>
> main = do
>     putStrLn $ show $ read
>
> Thanks
>
> -John
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>


More information about the Haskell-Cafe mailing list