Move from store to flat

This commit is contained in:
2022-08-20 17:54:35 +01:00
parent 8571ab9254
commit ff9dbdf068
95 changed files with 793 additions and 748 deletions
+7 -8
View File
@@ -1,8 +1,11 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Button where
import Flat
import LinearHelp
import Color
import Control.Lens
@@ -18,7 +21,7 @@ data ButtonDraw
= DefaultDrawButton Color
| DefaultDrawSwitch Color Color
| DrawNoButton
deriving (Eq, Ord, Show, Read)
deriving (Eq, Ord, Show, Read, Generic, Flat)
data ButtonEvent
= ButtonDoNothing
@@ -43,7 +46,7 @@ data ButtonEvent
, _boffEff :: WdWd
}
| ButtonAccessTerminal
deriving (Eq, Show, Read)
deriving (Eq, Show, Read, Generic, Flat)
data Button = Button
{ _btPict :: ButtonDraw --Button -> SPic
@@ -57,10 +60,10 @@ data Button = Button
, _btName :: String
, _btColor :: Color
}
deriving (Eq, Show, Read)
deriving (Eq, Show, Read, Generic, Flat)
data ButtonState = BtOn | BtOff | BtNoLabel
deriving (Eq, Ord, Show, Read)
deriving (Eq, Ord, Show, Read, Generic, Flat)
makeLenses ''Button
makeLenses ''ButtonEvent
@@ -68,7 +71,3 @@ deriveJSON defaultOptions ''ButtonDraw
deriveJSON defaultOptions ''ButtonEvent
deriveJSON defaultOptions ''Button
deriveJSON defaultOptions ''ButtonState
$($(derive [d| instance Deriving (Store ButtonDraw) |]))
$($(derive [d| instance Deriving (Store ButtonEvent) |]))
$($(derive [d| instance Deriving (Store Button) |]))
$($(derive [d| instance Deriving (Store ButtonState) |]))