
#9328: MINIMAL pragma should supprt negation -------------------------------------+------------------------------------- Reporter: augustss | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Keywords: | Differential Revisions: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: -------------------------------------+------------------------------------- Consider this class declaration {{{ class Conv a where to :: Integer -> a from :: a -> Integer default to :: (Generic a) => Integer -> a to i = ... default from :: (Generic a) => a -> Integer from a = ... }}} The class provides default methods for the two methods using generics. An instance declaration for this type is likely to want to use the default for both methods or for none. So I'd like a MINIMAL pragma that can express this. E.g. {{{ {-# MINIMAL (to, from) | (!to, !from) #-} }}} I've used ! for negation (following the lead set by the MINIMAL pragma using a non-Haskell OR operator), so this says: either implement 'to' and 'from' or don't implement neither 'to' nor 'from'. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9328 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler