summaryrefslogtreecommitdiffstats
path: root/app/Pretty/Color.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Pretty/Color.hs')
-rw-r--r--app/Pretty/Color.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/Pretty/Color.hs b/app/Pretty/Color.hs
index 7a55909..5ea5347 100644
--- a/app/Pretty/Color.hs
+++ b/app/Pretty/Color.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DeriveAnyClass #-}
{-# OPTIONS_GHC -fno-warn-unused-top-binds #-}
module Pretty.Color
@@ -8,6 +9,9 @@ module Pretty.Color
)
where
+import Control.DeepSeq (NFData)
+import GHC.Generics (Generic)
+
data Color
= Black
| Red
@@ -17,7 +21,7 @@ data Color
| Magenta
| Cyan
| White
- deriving (Show, Eq, Ord)
+ deriving (Show, Eq, Ord, Generic, NFData)
toXColor :: (Intensity, Color) -> XColor
toXColor (Dull, Black) = Color0
@@ -38,7 +42,7 @@ toXColor (Vivid, Cyan) = Color14
toXColor (Vivid, White) = Color15
data Intensity = Vivid | Dull
- deriving (Show, Eq, Ord)
+ deriving (Show, Eq, Ord, Generic, NFData)
data XColor
= Color0