Skip to content

Add TestCoercion instances for IORef and friends

Motivation

IORef is morally an instance of TestCoercion, because the term-level equality of p :: IORef a and q :: IORef b implies the existence of a Coercion a b.

The same can be said for a number of other types.

Proposal

Add TestCoercion instances (or TestEquality if they are nominal in their type argument) for IORef, STRef, MVar, Chan (in base) as well as similar types in stm and anywhere else.

Edited by Ashley Yakeley
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information