From cc24872a46d026aa5174c8e0f533de32f5497c9b Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 11 Jul 2016 12:18:11 -0400 Subject: [PATCH] Derive a Generic1 instance for OrderedMap. --- src/Data/OrderedMap.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Data/OrderedMap.hs b/src/Data/OrderedMap.hs index 444aaf311..e47e7f6b2 100644 --- a/src/Data/OrderedMap.hs +++ b/src/Data/OrderedMap.hs @@ -17,12 +17,13 @@ module Data.OrderedMap ( import Data.Align import Data.These +import GHC.Generics import Prologue hiding (toList, empty) import Test.QuickCheck -- | An ordered map of keys and values. newtype OrderedMap key value = OrderedMap { toList :: [(key, value)] } - deriving (Eq, Foldable, Functor, Generic, Ord, Show, Traversable) + deriving (Eq, Foldable, Functor, Generic, Generic1, Ord, Show, Traversable) -- | Construct an ordered map from a list of pairs of keys and values. fromList :: [(key, value)] -> OrderedMap key value