[GHC] #16260: Use of plugins causes -XSafe to fail

GHC ghc-devs at haskell.org
Thu Jan 31 19:18:17 UTC 2019


#16260: Use of plugins causes -XSafe to fail
-------------------------------------+-------------------------------------
        Reporter:  watashi           |                Owner:  watashi
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.7
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by watashi):

 @mpickering Thanks, I didn't notice there was already a similar ticket.
 `-fno-safe-haskell` would resolve the compilation issue in the ticket, but
 we still gets inconsistent `TcGblEnv`.
 For more background, I am trying to use source plugins to implement
 paralleled haddock, and this will generate wrong "Safe Haskell"
 information even we don't make any change.

 As you commented in #15920

 > I'm not that enthusiastic about a proposal as I don't know that anyone
 should rely on safe haskell as it's quite a neglected feature. I think I
 would rather write a proposal about removing safe haskell rather than
 understand how it should interact more precisely with plugins.

 In this case, do you think it makes sense to simply remove calls of
 `mark_plugin_unsafe` in `renamed/typeCheckResultAction`

 https://gitlab.haskell.org/ghc/ghc/blob/c2455e64/compiler/typecheck/TcRnDriver.hs#L2877

 and push the responsibility of calling `recordUnsafeInfer` to the plugin
 author and document this somewhere?

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


More information about the ghc-tickets mailing list