
#10820: Provide a way to detect what extensions are enabled via TH -------------------------------------+------------------------------------- Reporter: spinda | Owner: Type: feature | Status: new request | Priority: normal | Milestone: Component: Template | Version: 7.10.2 Haskell | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- This would be helpful for providing users with intuitive error messages if generated code relies on an extension that the user may not have enabled. Sample specification, to get things started: {{{ enabledExts :: Q [Extension] isExtEnabled :: Extension -> Q Bool data Extension = LiberalTypeSynonyms | RankNTypes | ... -- mirroring ExtensionFlag in DynFlags }}} See #10819 for an example case where this could be of use. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10820 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler