
1 Jun
2014
1 Jun
'14
2:13 a.m.
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