Proposal: instance TestEquality IORef
Ashley Yakeley
ashley at semantic.org
Sun Jun 1 06:13:21 UTC 2014
The base package includes the class Data.Type.Equality.TestEquality, for
types from which type equality can be deduced from values.
Given values ra rb of types "IORef a" and "IORef b", if they are the
same value (i.e. ra == unsafeCoerce rb), then one can deduce "a ~ b".
Therefore, IORef can be made an instance of TestEquality. The same is
true for various other reference types.
I propose these instances in base:
instance TestEquality IORef
instance TestEquality (STRef s)
-- Ashley Yakeley
More information about the Libraries
mailing list