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

GHC ghc-devs at haskell.org
Fri Mar 21 10:14:11 UTC 2014


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

Comment (by nomeata):

 > For example, we could say that with Safe Haskell the default roles (ie
 if you don't give an explicit signature) of any data type declared in that
 module are nominal rather than representational.

 What would that mean for inferring a module as Safe? Is `A` in the example
 Safe or nor? Would a module only be safe if it annotates everything as
 “nominal”?

 It seems to me that any special handling of Safe Haskell module is doomed
 to fail, because we want to be able to infer modules as Safe, i.e. we’ll
 have code where we do ''not'' know whether they are intended to be used as
 Safe modules or not.

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


More information about the ghc-tickets mailing list