1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00

elide not-useful DerivingStrategies

This commit is contained in:
Patrick Thomson 2019-01-11 12:36:29 -05:00
parent 3728044fcc
commit 1f7b6f5841

View File

@ -1,4 +1,4 @@
{-# LANGUAGE GeneralizedNewtypeDeriving, DerivingStrategies, DerivingVia, PatternSynonyms, ScopedTypeVariables, UndecidableInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving, DerivingVia, PatternSynonyms, ScopedTypeVariables, UndecidableInstances #-}
module Proto3.Suite.Exts
( PrimitiveEnum (..)
@ -24,8 +24,7 @@ pattern Absent = Nested Nothing
{-# COMPLETE Present, Absent #-}
newtype PrimitiveEnum a = PrimitiveEnum a
deriving stock (Eq, Ord)
deriving newtype (Bounded, Named, Enum, HasDefault)
deriving (Eq, Ord, Bounded, Named, Enum, HasDefault)
-- | Provides a DerivingVia hook to opt into a sensible definition of 'Primitive'
-- for a given 'Enum'. Should the decoding fail, the 'HasDefault' instance is used