[GHC] #11121: Introduce `-XTemplateHaskellQuotes` pragma for subset of TH
#11121: Introduce `-XTemplateHaskellQuotes` pragma for subset of TH -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature | Status: new request | Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: #10382, #11102 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- TODO: describe why we need this -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11121> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11121: Introduce `-XTemplateHaskellQuotes` pragma for subset of TH -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Template Haskell | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10382, #11102 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by hvr): * component: Compiler => Template Haskell -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11121#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11121: Introduce `-XTemplateHaskellQuotes` pragma for subset of TH -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Template Haskell | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10382, #11102 | Differential Rev(s): Phab:D1511 Wiki Page: | -------------------------------------+------------------------------------- Changes (by hvr): * differential: => Phab:D1511 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11121#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11121: Introduce `-XTemplateHaskellQuotes` pragma for subset of TH -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 8.0.1 Component: Template Haskell | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10382, #11102 | Differential Rev(s): Phab:D1511 Wiki Page: | -------------------------------------+------------------------------------- Changes (by hvr): * status: new => patch Old description:
TODO: describe why we need this
New description: Cabal needs to be able to detect whether a full or partial TemplateHaskell implementation is available. However, if `-XTemplateHaskell` has no clear meaning we can't properly specify which language extensions a package requires nor make accurate decisions based on the availability of compiler features. Moreover, the quotation subset of TemplateHaskell seems to be SafeHaskell compatible, so it makes sense to split it off into a sub-extension. -- -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11121#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11121: Introduce `-XTemplateHaskellQuotes` pragma for subset of TH -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 8.0.1 Component: Template Haskell | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10382, #11102 | Differential Rev(s): Phab:D1511 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"85fcd035f73679927a0539d5f6c9b919517365e1/ghc" 85fcd035/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="85fcd035f73679927a0539d5f6c9b919517365e1" Implement new -XTemplateHaskellQuotes pragma Since f16ddcee0c64a92ab911a7841a8cf64e3ac671fd / D876, `ghc-stage1` supports a subset of `-XTemplateHaskell`, but since we need Cabal to be able detect (so `.cabal` files can be specified accordingly, see also GHC #11102 which omits `TemplateHaskell` from `--supported-extensions`) whether GHC provides full or only partial `-XTemplateHaskell` support, the proper way to accomplish this is to split off the quotation/non-splicing `TemplateHaskell` feature-subset into a new language pragma `TemplateHaskellQuotes`. Moreover, `-XTemplateHaskellQuotes` is considered safe under SafeHaskell This addresses #11121 Reviewers: goldfire, ezyang, dterei, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1511 GHC Trac Issues: #11121 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11121#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11121: Introduce `-XTemplateHaskellQuotes` pragma for subset of TH -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 8.0.1 Component: Template Haskell | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10382, #11102 | Differential Rev(s): Phab:D1511 Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Merged. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11121#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11121: Introduce `-XTemplateHaskellQuotes` pragma for subset of TH -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: closed Priority: normal | Milestone: 8.0.1 Component: Template Haskell | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10382, #11102 | Differential Rev(s): Phab:D1511 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11121#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC