on master help sign in
Add Generic instance for Image
commit99361dee8fc5f3b32af53388edebe9737674c13b authorJonathan Daugherty <cygnus@foobox.com> dateTue 11 Oct 2016, 10:52 (10 years ago) parentac1517d
1 file changed+4−1
src/Graphics/Vty/Image/Internal.hs+4−1
src/Graphics/Vty/Image/Internal.hs+4−1
@@ -1,5 +1,6 @@
11{-# LANGUAGE CPP #-}
22{-# LANGUAGE NamedFieldPuns #-}
3+{-# LANGUAGE DeriveGeneric #-}
34{-# OPTIONS_HADDOCK hide #-}
45
56#ifndef MIN_VERSION_base
@@ -11,6 +12,8 @@ module Graphics.Vty.Image.Internal where
1112import Graphics.Vty.Attributes
1213import Graphics.Text.Width
1314
15+import GHC.Generics
16+
1417import Control.DeepSeq
1518
1619import qualified Data.Text.Lazy as TL
@@ -139,7 +142,7 @@ data Image =
139142 --
140143 -- Any image of zero size equals the empty image.
141144 | EmptyImage
142− deriving Eq
145+ deriving (Eq, Generic)
143146
144147instance Show Image where
145148 show ( HorizText { attr, displayText, outputWidth, charWidth } )