Add Store instances

This commit is contained in:
2022-08-21 12:21:05 +01:00
parent 1ce7d4a72d
commit dd62e30026
92 changed files with 465 additions and 255 deletions
+4 -2
View File
@@ -2,10 +2,12 @@
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StrictData #-}
--{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TemplateHaskell #-}
module Color where
import TH.Derive
import Data.Store
import Data.Binary
import Flat
import Data.Aeson
@@ -28,7 +30,7 @@ data PaletteColor
| WHITE
| BLACK
deriving (Eq, Ord, Enum, Show, Read, Generic, Flat)
instance Binary PaletteColor
$($(derive [d| instance Deriving (Store PaletteColor) |]))
instance ToJSON PaletteColor where
toEncoding = genericToEncoding defaultOptions