Both `Ptr a` in SerializedCompact are inaccurate because of the `a`
SerializedCompactPtr is defined as:
data SerializedCompact a = SerializedCompact
{ serializedCompactBlockList :: [(Ptr a, Word)]
, serializedCompactRoot :: Ptr a
}
But, these Ptr a values are a lie, because they don't point to something of type 'a', which makes the documentation for ghc-compact sort of confusing to look at. A more accurate type would just be Addr.
The consequences of this being changes to Addr are
1: breaking API changes (though not many people use compact regions)
2: A dependency on primitive would be necessary, though I'm again unsure how big of a deal this is, given that ghc-compact already depends on bytestring. (Addr should probably be moved to base, and re-exported from primitive, which would avoid this issue.)
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.4.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/compact |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | andrewthad, ezyang |
| Operating system | |
| Architecture |