From a74cc87b085fa15213f8901f091db2631fee10db Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 17 Oct 2021 21:27:50 +0200 Subject: add tileset property linting this reorganised the whole linting for tilesets somewhat; it's now very similar to that linting layers, and it may be possible to abstract some of the code away ... --- lib/Util.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/Util.hs') diff --git a/lib/Util.hs b/lib/Util.hs index 47ee7f2..18dfb5b 100644 --- a/lib/Util.hs +++ b/lib/Util.hs @@ -9,8 +9,8 @@ module Util where import Data.Aeson as Aeson import Data.Text (Text) import qualified Data.Text as T -import Tiled2 (Layer (layerData), PropertyValue (..), layerName, - mkTiledId) +import Tiled2 (Layer (layerData), PropertyValue (..), + Tileset (tilesetName), layerName, mkTiledId) -- | haskell's many string types are FUN … showText :: Show a => a -> Text @@ -43,6 +43,9 @@ instance PrettyPrint () where instance PrettyPrint Layer where prettyprint = (<>) "layer " . layerName +instance PrettyPrint Tileset where + prettyprint = (<>) "tileset " . tilesetName + printPretty :: PrettyPrint a => a -> IO () printPretty = putStr . T.unpack . prettyprint -- cgit v1.2.3