
#16240: Core visible conditional compilation/static definition/code selection based upon static key values -------------------------------------+------------------------------------- Reporter: carter | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.7 Resolution: | Keywords: 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 alanz): I think we should consider separately the operation of conditionals to enable/disable/switch out blocks of code, and the use of other (CPP) primitives such as `#define` as a shortcut for configuring code. I regard the former as "low-power" and potentially able to be manageable integrated into tooling, if we assume that the inactive block must meet some minimal syntactic requirements, but not necessarily be able to be fully parsed or type checked. The latter should be discouraged, and if needed fall back to CPP as we have now, with the understanding that certain classed of tooling are then not possible. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16240#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler