[GHC] #13508: Clarify Some Restrictions on Compact Regions

GHC ghc-devs at haskell.org
Sun Apr 2 00:26:33 UTC 2017


#13508: Clarify Some Restrictions on Compact Regions
-------------------------------------+-------------------------------------
        Reporter:  andrewthad        |                Owner:  ezyang
            Type:  bug               |               Status:  patch
        Priority:  lowest            |            Milestone:  8.2.1
       Component:                    |              Version:  8.1
  libraries/compact                  |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D3407
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by bgamari):

 * status:  new => patch
 * differential:   => Phab:D3407
 * milestone:   => 8.2.1


Comment:

 I believe mutable byte arrays should be fine. The limitation is merely
 that you can't have things with **mutable pointers**. This limitation is
 due to the principle invariant of a compact region: that all objects in
 the transitive closure of an given member must also be members of the
 region. This invariant is enforced when the region is constructed.

 Allowing mutable pointers (e.g. `MutableArray#` and `MutVar#`) would
 enable the user to break this invariant by introducing a pointer to an
 object residing outside of the region.

 I agree that the language in the documentation could be improved. How does
 Phab:D2407 look?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13508#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list