diff options
Diffstat (limited to '')
-rw-r--r-- | lib/Util.hs | 5 |
1 files changed, 5 insertions, 0 deletions
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 |