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
+4 -8
View File
@@ -1,8 +1,11 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Sound.Data where
import Flat
import TH.Derive
import Data.Store
import LinearHelp
@@ -31,7 +34,7 @@ data PlayStatus
deriving (Eq, Ord, Show)
newtype SoundID = SoundID {_getSoundID :: Int}
deriving (Eq, Ord, Show, Read)
deriving (Eq, Ord, Show, Read, Generic, Flat)
newtype SoundData = SoundData
{ _loadedChunks :: IM.IntMap Mix.Chunk
@@ -67,10 +70,3 @@ deriveJSON defaultOptions ''SoundStatus
deriveJSON defaultOptions ''PlayStatus
deriveJSON defaultOptions ''SoundID
deriveJSON defaultOptions ''ToPlaySound
{- FOURMOLU_DISABLE -}
$($(derive [d| instance Deriving (Store SoundStatus) |]))
$($(derive [d| instance Deriving (Store PlayStatus) |]))
$($(derive [d| instance Deriving (Store SoundID) |]))
$($(derive [d| instance Deriving (Store ToPlaySound) |]))
{- FOURMOLU_ENABLE -}