Add generic derivations and To/FromJSON instances
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
--{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
module Dodge.Data.Item.HeldScroll where
|
||||
|
||||
import GHC.Generics
|
||||
import Data.Aeson
|
||||
data HeldScroll = HeldScrollDoNothing | HeldScrollZoom | HeldScrollCharMode
|
||||
deriving (Eq,Ord,Enum,Bounded,Show,Read)
|
||||
deriving (Eq,Ord,Enum,Bounded,Show,Read,Generic)
|
||||
instance ToJSON HeldScroll where
|
||||
toEncoding = genericToEncoding defaultOptions
|
||||
instance FromJSON HeldScroll
|
||||
|
||||
Reference in New Issue
Block a user