[GHC] #14195: Generalize makeStableName#

GHC ghc-devs at haskell.org
Thu Sep 7 22:39:26 UTC 2017


#14195: Generalize makeStableName#
-------------------------------------+-------------------------------------
        Reporter:  andrewthad        |                Owner:  (none)
            Type:  feature request   |               Status:  patch
        Priority:  low               |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      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:D3928
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by simonpj):

 * cc: simonmar (added)


Comment:

 Hang on.  Making a new stable name has an I/O effect: it modifies a
 single, shared stable name table.  When things have an I/O effect we put
 them in the IO monad.

 To put it more concretely, with the new signature I could say
 {{{
 mks v :: a -> StableName# a
 mks v = runST (mkStableName# v)
 }}}
 But as the original paper points out, making a fresh stable name is not a
 pure operation.

 Copying Simon Marlow

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


More information about the ghc-tickets mailing list