[Haskell-cafe] Physical equality
Sönke Hahn
shahn at cs.tu-berlin.de
Mon Jun 28 18:22:21 EDT 2010
On Monday, June 28, 2010 10:38:33 am José Romildo Malaquias wrote:
> Is there in Haskell a non monadic function of type a -> a -> Bool which
> test for physical equality of two values? It would return True if only
> if both values are the same object in memory.
IIRC "observable sharing" does similar things.
Sönke
>
> For instance:
>
> value1 = "good"
> value2 = "good"
>
> eq value1 value2 => False
>
> value1 = "good"
> value2 = value1
>
> eq value1 value2 => True
>
> Romildo
> _______________________________________________
> 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