[Haskell-cafe] question about show

ok at cs.otago.ac.nz ok at cs.otago.ac.nz
Thu Mar 6 07:15:53 UTC 2014

> On 06/03/14 03:53, David Fox wrote:
> What about instances where we can't have a reasonable Show that fulfills
> your requirement? Say, any structure which encapsulates a function.

Then you write a custom show function that does the best it can.

For what it's worth, Smalltalk has historically had

    thing printOn: stream
      write thing on stream for people to read

    thing storeOn: stream
      write thing on stream so that #readFrom:
      can read it back

and functions (which Smalltalk calls 'blocks') basically
defeat both of them.

More information about the Haskell-Cafe mailing list