[GHC] #13349: Make GHC handle orphan COMPLETE sets of conlikes better

#13349: Make GHC handle orphan COMPLETE sets of conlikes better -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Keywords: | Operating System: Unknown/Multiple PatternSynonyms | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Like orphan rewrite rules, it's possible to define orphan `COMPLETE` sets. For instance: {{{#!hs module Foo where {-# COMPLETE False #-} }}} I suppose that we could define an orphan `COMPLETE` set as one that lives in a module where none of the conlikes are defined (or should we say "where one or more of the conlikes are not defined"? I'm not sure.) Like orphan `RULES`, orphan `COMPLETE` sets are important to track properly when transitively reading from interface files, as failing to bring an orphan `COMPLETE` set into scope could affect pattern-match exhaustivness warnings that users see. After discussing this with rwbarton and mpickering IRC, we decided that one of the two should happen: 1. Treat orphan `COMPLETE` sets like orphan `RULES`. That is, mark a module as an orphan if it defines an orphan `COMPLETE` set, and thread a "`COMPLETE` pragma visibility" state through various places. 2. Disallow orphan `COMPLETE` sets entirely. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13349 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13349: Make GHC handle orphan COMPLETE sets of conlikes better -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by rwbarton): * priority: normal => highest * milestone: => 8.2.1 Comment: Let's do 2 before COMPLETE pragmas are released into the wild, so that nobody starts to depend on orphan COMPLETE pragmas. I assume it is not difficult. Then we could consider whether to do 1 later; but that is certainly a fair amount of work and probably not worthwhile. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13349#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13349: Make GHC handle orphan COMPLETE sets of conlikes better -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: rwbarton Type: bug | Status: new Priority: highest | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by rwbarton): * owner: (none) => rwbarton -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13349#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13349: Make GHC handle orphan COMPLETE sets of conlikes better -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: rwbarton Type: bug | Status: new Priority: highest | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: | PatternSynonyms 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 mpickering): I think there is just one place to change in the renamer. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13349#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13349: Make GHC handle orphan COMPLETE sets of conlikes better -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: rwbarton Type: bug | Status: patch Priority: highest | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3243 Wiki Page: | -------------------------------------+------------------------------------- Changes (by rwbarton): * status: new => patch * differential: => Phab:D3243 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13349#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13349: Make GHC handle orphan COMPLETE sets of conlikes better -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: rwbarton Type: bug | Status: patch Priority: highest | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3243 Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): I agree with comment:1. Let's adopt (2) for now. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13349#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13349: Make GHC handle orphan COMPLETE sets of conlikes better
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: rwbarton
Type: bug | Status: patch
Priority: highest | Milestone: 8.2.1
Component: Compiler | Version: 8.1
Resolution: | Keywords:
| PatternSynonyms
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3243
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#13349: Make GHC handle orphan COMPLETE sets of conlikes better -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: rwbarton Type: bug | Status: closed Priority: highest | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: fixed | Keywords: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3243 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13349#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC