Add Store instances
This commit is contained in:
+4
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user