[GHC] #8827: Inferring Safe mode with GeneralizedNewtypeDeriving is wrong

GHC ghc-devs at haskell.org
Thu Apr 9 07:59:39 UTC 2015


#8827: Inferring Safe mode with GeneralizedNewtypeDeriving is wrong
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.9
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:  8226, 8745        |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by simonpj):

 The GHC 7.6 user manual
 [https://downloads.haskell.org/~ghc/7.6.3/docs/html/users_guide/safe-
 haskell.html#safe-language used to say]: ''GeneralizedNewtypeDeriving — It
 can be used to violate constructor access control, by allowing untrusted
 code to manipulate protected data types in ways the data type author did
 not intend, breaking invariants they have established.''.

 But that was removed in
 [https://downloads.haskell.org/~ghc/7.8.2/docs/html/users_guide/safe-
 haskell.html#safe-language the 7.8 user manual], which seems to contradict
 the conclusion in comment:36.  Would someone like to fix the manual to say
 what it should say, whatever that now is?

 See [https://mail.haskell.org/pipermail/haskell-
 cafe/2015-April/118970.html this Haskell Cafe thread].

 Simon

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


More information about the ghc-tickets mailing list