UniqSet definition seems shady
Currently,
type UniqSet a = UniqFM a
The key invariant of UniqSet
is expressed in the somewhat-poorly-named Note [Unsound mapUniqSet]
, and not enforced by the types. It seems likely that the clean thing is
newtype UniqSet a = US (UniqFM a)
Unfortunately there's an awful lot of code using UniqSet
and assuming it's the same as UniqFM
. To make this work, we'd need to expand the UniqSet
API somewhat and figure out what to do at use sites using it interchangeably with UniqFM
.
Trac metadata
Trac field | Value |
---|---|
Version | 8.1 |
Type | Task |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |