Move from store to flat
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
@@ -8,6 +10,7 @@ module Dodge.Data.Item.Use.Consumption (
|
||||
module Dodge.Data.Item.Use.Consumption.LoadAction,
|
||||
) where
|
||||
|
||||
import Flat
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Control.Lens
|
||||
@@ -26,7 +29,7 @@ data HeldConsumption
|
||||
, _laProgress :: Maybe [LoadAction]
|
||||
}
|
||||
| NoConsumption
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
data LeftConsumption
|
||||
= AutoRecharging
|
||||
@@ -39,10 +42,10 @@ data LeftConsumption
|
||||
{ _wpMaxCharge :: Int
|
||||
, _wpCharge :: Int
|
||||
}
|
||||
deriving (Eq, Show, Read)
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
newtype ItAmount = ItAmount {_getItAmount :: Int}
|
||||
deriving (Eq, Ord, Read, Show, Num, Real, Enum, Integral)
|
||||
deriving (Eq, Ord, Read, Show, Num, Real, Enum, Integral, Generic, Flat)
|
||||
|
||||
makeLenses ''HeldConsumption
|
||||
makeLenses ''LeftConsumption
|
||||
@@ -50,6 +53,3 @@ makeLenses ''ItAmount
|
||||
deriveJSON defaultOptions ''HeldConsumption
|
||||
deriveJSON defaultOptions ''LeftConsumption
|
||||
deriveJSON defaultOptions ''ItAmount
|
||||
$($(derive [d| instance Deriving (Store HeldConsumption) |]))
|
||||
$($(derive [d| instance Deriving (Store LeftConsumption) |]))
|
||||
$($(derive [d| instance Deriving (Store ItAmount) |]))
|
||||
|
||||
Reference in New Issue
Block a user