@@ -135,7 +135,12 @@ genericParseJSON opts = fmap to . gParseJSON opts
135135class ToJSON a where
136136 -- | Convert a Haskell value to a JSON-friendly intermediate type.
137137 toJSON :: a -> Value
138− {-# MINIMAL toJSON #-}
138+
139+ -- TODO: We would like to set the MINIMAL pragma for toJSON but then
140+ -- instances which are using the default Generic implementation will
141+ -- complain that toJSON is not defined.
142+ -- See GHC bug: https://ghc.haskell.org/trac/ghc/ticket/10959
143+ -- {-# MINIMAL toJSON -- #-}
139144
140145 default toJSON :: (Generic a, GToJSON (Rep a)) => a -> Value
141146 toJSON = genericToJSON defaultOptions