
#12389: Limit duplicate export warnings for datatypes -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: #11959 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dfeuer): Replying to [comment:1 rwbarton]:
Well the first `Foo` export certainly looks redundant (as long as at least one of the CPP flags is enabled).
I don't really see how your second version is any better than what you say is "so horrible [...]": {{{#!hs module Foo ( Foo ( #ifdef TESTING Foo, #endif #ifdef USE_PATTERN_SYNONYMS Pat1, Pat2, #endif ) ) }}}
(A trailing comma is legal here right? Otherwise it really is a mess.)
I don't know about GHC 8, but in 7.10, a trailing comma is *not* legal, and neither is a leading one. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12389#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler