summaryrefslogtreecommitdiff
path: root/lib/Util.hs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/Util.hs7
1 files changed, 5 insertions, 2 deletions
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