15 lines
466 B
Haskell
15 lines
466 B
Haskell
{-# LANGUAGE DeriveGeneric #-}
|
|
module Pokemon.Status (
|
|
Status(..)
|
|
) where
|
|
|
|
import Data.Aeson (ToJSON(..), FromJSON(..), genericToEncoding, genericParseJSON, defaultOptions)
|
|
import GHC.Generics (Generic)
|
|
|
|
data Status = Normal | Sleeping | Frozen | Poisoned | Burning | Confused | InLove deriving (Generic)
|
|
|
|
instance ToJSON Status where
|
|
toEncoding = genericToEncoding defaultOptions
|
|
instance FromJSON Status where
|
|
parseJSON = genericParseJSON defaultOptions
|