[GHC] #9429: Alternative to type family Any

GHC ghc-devs at haskell.org
Wed Aug 13 13:22:42 UTC 2014


#9429: Alternative to type family Any
-------------------------------------+-------------------------------------
              Reporter:  mboes       |            Owner:
                  Type:  feature     |           Status:  new
  request                            |        Milestone:
              Priority:  normal      |          Version:  7.9
             Component:  Compiler    |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:              |  Related Tickets:  9097, 9380
  None/Unknown                       |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by rrnewton):

 Hi all,

 Uh uh!  Our approach to lock-free data structures in Haskell (atomic-
 primops, chaselev-deque, lockfree-queue, concurrent-skiplist) is based on
 `Any`.

 The way we use Any is simply to prevent GHC from performing any
 optimizations that change the pointer identity of the object.  That is,
 the "Ticket" type in atomic-primops is really just an Any.  Is there some
 other way to accomplish this goal via other means in GHC head?  Perhaps we
 need something like NOINLINE...

 Johan's been adding more and better atomic memory primop support in HEAD
 but it sounds like this is at cross purposes with Any also being removed
 from HEAD!

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


More information about the ghc-tickets mailing list