[Haskell-cafe] bug in ghci ?

Marc Weber marco-oweber at gmx.de
Thu Jul 8 09:33:57 EDT 2010


Hi titto,

You should try to give a complete list of steps which can be run to
reproduce your problem. This also includes ghci --version output and
maybe some info about the OS you're working on.

So how you you load the code into ghci? Using ghci File.hs or :l ?


In any case you want to declare the show method:

  -- yes, I know I should just use 'deriving (Show)' because most
  -- developers expect Read Show instances to work the common way
  -- which means they serialize and unserialize data types in a reliable
  -- way ...
  instance Show Test where
    show (Test s) = "my show implementation of Test: Test " ++ s

Marc Weber


More information about the Haskell-Cafe mailing list