module Codec.Tiled.Tileset.WangTile where
import Data.Vector (Vector)
import GHC.Generics (Generic)
import Codec.Tiled.Aeson (FromJSON(..), ToJSON(..), genericParseJSON, genericToJSON)
data WangTile = WangTile
{ WangTile -> Int
tileId :: Int
, WangTile -> Vector Int
wangId :: Vector Int
}
deriving (WangTile -> WangTile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WangTile -> WangTile -> Bool
$c/= :: WangTile -> WangTile -> Bool
== :: WangTile -> WangTile -> Bool
$c== :: WangTile -> WangTile -> Bool
Eq, Int -> WangTile -> ShowS
[WangTile] -> ShowS
WangTile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WangTile] -> ShowS
$cshowList :: [WangTile] -> ShowS
show :: WangTile -> String
$cshow :: WangTile -> String
showsPrec :: Int -> WangTile -> ShowS
$cshowsPrec :: Int -> WangTile -> ShowS
Show, forall x. Rep WangTile x -> WangTile
forall x. WangTile -> Rep WangTile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WangTile x -> WangTile
$cfrom :: forall x. WangTile -> Rep WangTile x
Generic)
instance FromJSON WangTile where
parseJSON :: Value -> Parser WangTile
parseJSON = forall a. (Generic a, GFromJSON Zero (Rep a)) => Value -> Parser a
genericParseJSON
instance ToJSON WangTile where
toJSON :: WangTile -> Value
toJSON = forall a. (Generic a, GToJSON' Value Zero (Rep a)) => a -> Value
genericToJSON