[GHC] #8176: Language extensions not registered

#8176: Language extensions not registered --------------------------------+------------------------------------------ Reporter: duncan | Owner: thoughtpolice Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: tests/driver/T4437.hs Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | --------------------------------+------------------------------------------ tests/driver/T4437.hs does not seem to be being used properly. That test is there to make sure that ghc developers do not forget to register their new extensions with Cabal. But it looks like it's just being silenced and they are being forgotten again. Recall, the protocol is that all Haskell implementations can register their extensions in the central location (which is Language.Haskell.Extensions in the Cabal package) when they are happy that they are ready for public consumption. This matters to users because extensions that are not ready for public consumption (ie not registered) cannot be used in packages uploaded to hackage. Currently `tests/driver/T4437.hs` contains: {{{ expectedGhcOnlyExtensions = [ "AllowAmbiguousTypes", "RelaxedLayout", "AlternativeLayoutRule", "AlternativeLayoutRuleTransitional", "ExplicitNamespaces", "TypeHoles", "OverloadedLists", "EmptyCase", "AutoDeriveTypeable", "NegativeLiterals", "NullaryTypeClasses"] }}} This looks like a much bigger list than it should be. Surely not all of these extensions are private to ghc or are still under development and not to be used? But if they are listed here, then the test doesn't complain about them. And the whole point of this test is to stop ghc devs from forgetting to register them. I think we need to change the test so that we distinguish between extensions that are really not ready, and ones that are on-track to be public. It should be a release blocker for the "on-track to be public" ones to still not be registered. The test should have comments giving this guidance for ghc contributors. I'm not quite sure how we adjust the test to make that happen (ie different behaviour for RC-build vs normal hacking validate). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered ------------------------------------------+-------------------------------- Reporter: duncan | Owner: Type: bug | thoughtpolice Priority: normal | Status: new Component: Compiler | Milestone: 7.8.1 Resolution: | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: tests/driver/T4437.hs | Unknown/Multiple Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Changes (by hvr): * cc: hvr (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered ------------------------------------------+-------------------------------- Reporter: duncan | Owner: Type: bug | thoughtpolice Priority: normal | Status: new Component: Compiler | Milestone: 7.8.1 Resolution: | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: tests/driver/T4437.hs | Unknown/Multiple Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by simonpj): I think that the underlying difficulty is that we don't have a clearly- articulated protocol. What, step by step, should a GHC developer do when adding an extension? The steps should cover what happens in the intervening bit, when the extension isn't in Cabal but is in GHC... we don't want validate to fail at that point. I think if we laid out some steps (and pointed to them from the test) it'd be much more likely to happen. Thanks, Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered ------------------------------------------+-------------------------------- Reporter: duncan | Owner: Type: bug | thoughtpolice Priority: normal | Status: new Component: Compiler | Milestone: 7.8.1 Resolution: | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: tests/driver/T4437.hs | Unknown/Multiple Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by hvr): ...while we're at it; as cabal-1.18 is in RC-mode right now for a couple of days: which of the above listed ghc-only extensions are deemed worthy for public consumption in GHC 7.8 and shall be made known to to the final release of Cabal-1.18.0? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered ------------------------------------------+-------------------------------- Reporter: duncan | Owner: Type: bug | thoughtpolice Priority: normal | Status: new Component: Compiler | Milestone: 7.8.1 Resolution: | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: tests/driver/T4437.hs | Unknown/Multiple Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by dreixel): I think `AutoDeriveTypeable` is. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered ------------------------------------------+-------------------------------- Reporter: duncan | Owner: Type: bug | thoughtpolice Priority: normal | Status: new Component: Compiler | Milestone: 7.8.1 Resolution: | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: tests/driver/T4437.hs | Unknown/Multiple Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by simonpj): I've just checked, and added some missing documentation. My resulting list is this: {{{ RelaxedLayout AlternativeLayoutRule AlternativeLayoutRuleTransitional I have no idea about these three. Need input from Ian AllowAmbiguousTypes Yes ExplicitNamespaces Yes (allows you to say 'type (+)' in import/export lists) TypeHoles Yes OverloadedLists Yes EmptyCase Yes AutoDeriveTypeable Yes NegativeLiterals Yes NullaryTypeClasses Yes }}} Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered ------------------------------------------+-------------------------------- Reporter: duncan | Owner: Type: bug | thoughtpolice Priority: normal | Status: new Component: Compiler | Milestone: 7.8.1 Resolution: | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: tests/driver/T4437.hs | Unknown/Multiple Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by duncan): So comparing with what we comitted during the recent Zurich hackathon: https://github.com/haskell/cabal/commit/d40207efec3133735cee89aec17974ea6c30... * OverloadedLists * EmptyCase * AutoDeriveTypeable * NegativeLiterals * NumDecimals * NullaryTypeClasses We added all these because they were documented in the user guide already. We didn't add TypeHoles on the theory that it would not be used in released packages. However on reflection it would be better to add it as a registered extension but to have an explicit check for it not being used in distributed packages (e.g. like we complain about -Werror). So what are we still missing then? * ExplicitNamespaces * AllowAmbiguousTypes We should check these are documented in the user guide and then register them in Language.Haskell.Extensions. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered ------------------------------------------+-------------------------------- Reporter: duncan | Owner: Type: bug | thoughtpolice Priority: normal | Status: new Component: Compiler | Milestone: 7.8.1 Resolution: | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: tests/driver/T4437.hs | Unknown/Multiple Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by duncan): And Simon is right of course about documenting the procedure. I suggest the test case link to a page in the ghc wiki which describes the process clearly. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered ------------------------------------------+-------------------------------- Reporter: duncan | Owner: Type: bug | thoughtpolice Priority: normal | Status: new Component: Compiler | Milestone: 7.8.1 Resolution: | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: tests/driver/T4437.hs | Unknown/Multiple Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by hvr): Fyi, Simon added documentation (including the 3 outstanding extensions) via d5b81cb387ceb8e717828047edc52586d4bc19bb -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered ------------------------------------------+-------------------------------- Reporter: duncan | Owner: Type: bug | thoughtpolice Priority: normal | Status: closed Component: Compiler | Milestone: 7.8.1 Resolution: fixed | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: tests/driver/T4437.hs | Unknown/Multiple Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Changes (by thoughtpolice): * status: new => closed * resolution: => fixed * milestone: 7.8.3 => 7.8.1 Comment: This is now all cleaned up and fixed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered -------------------------------------+------------------------------------- Reporter: duncan | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | tests/driver/T4437.hs Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * keywords: => newcomer * status: closed => new * resolution: fixed => * owner: thoughtpolice => Comment: Task for a newcomer. `testsuite/tests/driver/T4437.hs` currently contains: {{{ expectedGhcOnlyExtensions :: [String] expectedGhcOnlyExtensions = ["RelaxedLayout", "AlternativeLayoutRule", "AlternativeLayoutRuleTransitional", "StaticPointers", "StrictData"] }}} The last 2 extensions should be registered with Cabal. Submit a pull request to https://github.com/haskell/Cabal/pulls. I don't know what the first 3 are about, they are not listed on https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/flag- reference.html. Try to find out if they can be deleted. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered -------------------------------------+------------------------------------- Reporter: duncan | Owner: Type: task | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | tests/driver/T4437.hs Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * type: bug => task -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered -------------------------------------+------------------------------------- Reporter: duncan | Owner: Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | tests/driver/T4437.hs Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * milestone: 7.8.1 => 8.0.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered -------------------------------------+------------------------------------- Reporter: duncan | Owner: Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | tests/driver/T4437.hs Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * keywords: newcomer => Comment: See also https://github.com/haskell/cabal/issues/2291. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered -------------------------------------+------------------------------------- Reporter: duncan | Owner: Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | tests/driver/T4437.hs Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by hvr): Replying to [comment:10 thomie]:
I don't know what the first 3 are about, they are not listed on https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/flag- reference.html. Try to find out if they can be deleted.
That very question comes up before every major GHC release ;-) See e.g. https://mail.haskell.org/pipermail/ghc- devs/2013-September/002267.html short answer: those are not considered official yet -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered -------------------------------------+------------------------------------- Reporter: duncan | Owner: Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | tests/driver/T4437.hs Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): I have opened #11359 to track the potential removal of these three layout language extensions. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8176: Language extensions not registered
-------------------------------------+-------------------------------------
Reporter: duncan | Owner:
Type: task | Status: new
Priority: normal | Milestone: 8.0.1
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| tests/driver/T4437.hs
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#8176: Language extensions not registered -------------------------------------+------------------------------------- Reporter: duncan | Owner: Type: task | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | tests/driver/T4437.hs Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => fixed Comment: This issue is now tracked in #11359. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8176#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC