Follow latest changes in Hanafuda.ID

This commit is contained in:
Tissevert 2019-11-12 22:18:52 +01:00
parent 57370d62ee
commit f968c41d9d

View file

@ -29,7 +29,7 @@ import qualified Data.Text as Text (pack, unpack)
import Data.Text.Encoding (decodeUtf8, encodeUtf8)
import GHC.Generics (Generic)
import qualified Hanafuda (Card(..), Flower(..), Pack, cardsOfPack, empty, packOfCards)
import Hanafuda.ID (ID(..), getID)
import Hanafuda.ID (ID(..))
import Hanafuda.KoiKoi (PlayerID)
import qualified Hanafuda.KoiKoi as KoiKoi (
Action(..), Game(..), Mode(..), Move(..), Player(..), Players(..), PlayerTurn
@ -44,7 +44,7 @@ instance FromJSONKey PlayerID where
instance ToJSON PlayerID where
toEncoding = genericToEncoding defaultOptions
instance ToJSONKey PlayerID where
toJSONKey = toJSONKeyText (Text.pack . getID)
toJSONKey = toJSONKeyText (Text.pack . show . getID)
first :: (a -> a) -> [a] -> [a]
first _ [] = []