
That's interesting! I do see Eq instances for types TVars and IORefs but no Ord instance. But I don't see an Eq instance defined for the (->) type which also seems to be considered a reference-like type in the discussion. However I do think the argument can be made that the Eq instance for reference types is equally questionable for similar reasons.
On Wednesday, 15 January 2020, 09:06:52 UTC, Zemyla
David put my thoughts pretty clearly: is it more useful or more confusing? I am also leaning toward more confusing. Hopefully more can weigh in on this.
I also think NFData instances for reference types are more dangerous than helpful. Since laziness and strictness account for subtle programming mistakes, it is better if GHC tells you that 'rnf tvar' does possibly not perform what you expect. I'd even consider to add an instance with a type error message to show the user that this instance has been omitted by intention. _______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries _______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries