[GHC] #15920: Implement a flag which disables safe Haskell

#15920: Implement a flag which disables safe Haskell -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When adding a plugin to a module, it marks the module as unsafe. If I automatically run a plugin on every module I build then all the modules are therefore marked unsafe. This means that libraries start failing to compile as the safety properties change. However, I don't care about safe haskell and want to turn off this error but there appears to be no way to do so. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15920 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15920: Implement a flag which disables safe Haskell -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.8.1 Component: Compiler | Version: 8.6.2 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:D5360 Wiki Page: | -------------------------------------+------------------------------------- Changes (by mpickering): * priority: normal => high * differential: => Phab:D5360 * milestone: 8.6.3 => 8.8.1 Comment: See D5360 - https://phabricator.haskell.org/D5360 I'm blocked without this fix. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15920#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15920: Implement a flag which disables safe Haskell -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.8.1 Component: Compiler | Version: 8.6.2 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:D5360 Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): So can this patch be merged into 8.8? Otherwise plugins are much less usable. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15920#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15920: Implement a flag which disables safe Haskell
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner: (none)
Type: bug | Status: new
Priority: high | Milestone: 8.8.1
Component: Compiler | Version: 8.6.2
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:D5360
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#15920: Implement a flag which disables safe Haskell -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: closed Priority: high | Milestone: 8.8.1 Component: Compiler | Version: 8.6.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5360 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15920#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15920: Implement a flag which disables safe Haskell -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: closed Priority: high | Milestone: 8.8.1 Component: Compiler | Version: 8.6.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5360 Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): I know it's "too late", but this strikes me as something that should get more visibility. With the feature requested here, it is now possible to compile a module with `{-# LANGUAGE Safe #-}` in it but that uses `unsafeCoerce`. The fact that this happens might be buried in a `.cabal` file or even more obfuscated. While I certainly recognize why Matt wanted this, and I see no reasonable alternative, I do think that this begs the larger question of what guarantees we can expect from a module with `{-# LANGUAGE Safe #-}` in it. I think the best course would be to make a post-hoc ghc-proposal to seek community input on the design here. I don't advocate reverting the patch -- I see how you can be quite blocked without this -- but I still want to have a larger conversation about the design goals here. Do you agree? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15920#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15920: Implement a flag which disables safe Haskell -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: closed Priority: high | Milestone: 8.8.1 Component: Compiler | Version: 8.6.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5360 Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15920#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC