[Haskell-cafe] Identity of indiscernibles (Was: Alternative name for return)

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Thu Aug 8 13:23:05 CEST 2013


On Thu, Aug 08, 2013 at 11:38:08AM +0200, Jerzy Karczmarczuk wrote:
> Tom Ellis:
> >If I were writing a Haskell compiler I could certainly define 'IO' to be a
> >datatype that would allow me to compare 'putStr "c"' to itself.  The
> >comparison could not be of operational equivalence, but it would still be
> >possible to compare values in IO in a reasonable sense.
> 
> Would you add to all this:
> getLine == getLine
> etc.?
> 
> Good luck!
> 
> I suspect that you would have to establish also the equality
> relation between functions and between infinite streams.
> And you would end as Giordano Bruno and Jeanne d'Arc. But for
> different reasons.

Not at all.  One could simply implement IO as a free monad, to take one
example.

Tom




More information about the Haskell-Cafe mailing list