[GHC] #12509: ghci -XSafe fails in an inscrutable way

GHC ghc-devs at haskell.org
Thu Dec 20 17:08:43 UTC 2018


#12509: ghci -XSafe  fails in an inscrutable way
-------------------------------------+-------------------------------------
        Reporter:  int-e             |                Owner:  RolandSenn
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:  SafeHaskell
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RolandSenn):

 @monodial:
 > I suspect that that this can be done using code similar to
 ​https://phabricator.haskell.org/D5452

 It's not quite simple as this. -XSafe is not a dynamic flag, and is not
 meant be be reset.
 Therefore a simple function similar to `gopt_set :: DynFlags ->
 GeneralFlag -> DynFlags` is not available to set `SafeHaskellMode` !

 The return type of the function `setSafeHaskell :: SafeHaskellMode -> DynP
 ()` is more complicated to use, and I think, adding a new public function
 to the DynFlags module for this ticket is probably not the best idea.

 However, I have still some other ideas to solve this...

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


More information about the ghc-tickets mailing list