
Am 13.08.2014 um 02:02 schrieb David Feuer:
On Aug 12, 2014 7:50 PM, "Bertram Felgenhauer"
I tend to agree that those MonadFix instances are not immensely useful.
From my perspective as a generally ignorant person, I think these should be kept as long as
1. They satisfy the required laws and 2. No more useful instances can be written.
That said, it might make sense to remove them if
1*. You can formulate a new law that distinguishes the instances you consider sensible from the ones you consider insensible.
and to change them if 2*. More useful instances can be written.
I was not argueing from a mathematical point of view but from a safety point of view. It's the same reason why I object to, say (Ord (Complex a)) and (Num (a -> b)). Incidentally, I had the ThreadId problem last week, but fortunately I could solve it with myThreadId instead of mfix.
If potential confusion is the only issue, improving the documentation would probably be the way to go.
Generally I prefer removing dangerous behaviour instead of documenting it. The documentation may easily be missed, a compiler error message cannot.