From ec9552b1d6ab303d54a8bbb8c93418f32fa29654 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Wed, 8 Dec 2021 00:56:31 +0100 Subject: rudimentary linting for overlapping layers --- lib/Util.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/Util.hs') diff --git a/lib/Util.hs b/lib/Util.hs index e676e7e..1e5826c 100644 --- a/lib/Util.hs +++ b/lib/Util.hs @@ -8,6 +8,8 @@ module Util where import Data.Aeson as Aeson import Data.Proxy (Proxy (..)) +import Data.Set (Set) +import qualified Data.Set as S import Data.Text (Text) import qualified Data.Text as T import Tiled (Layer (layerData), PropertyValue (..), @@ -36,6 +38,9 @@ instance PrettyPrint Aeson.Value where Aeson.String s -> prettyprint s v -> (T.pack . show) v +instance PrettyPrint t => PrettyPrint (Set t) where + prettyprint = T.intercalate ", " . fmap prettyprint . S.toList + instance PrettyPrint PropertyValue where prettyprint = \case StrProp str -> str -- cgit v1.2.3