From 52b73711fc21e121267318677840a54fbe174b10 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 14 Nov 2021 03:09:50 +0100 Subject: Functional jitsiRoomAdminTag adjustment also yet another typeclass™, because why not? --- lib/Tiled2.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/Tiled2.hs') diff --git a/lib/Tiled2.hs b/lib/Tiled2.hs index efa8a07..873e22d 100644 --- a/lib/Tiled2.hs +++ b/lib/Tiled2.hs @@ -339,6 +339,15 @@ instance HasName Layer where instance HasName Tileset where getName = tilesetName +class IsProperty a where + asProperty :: a -> PropertyValue +instance IsProperty PropertyValue where + asProperty = id + {-# INLINE asProperty #-} +instance IsProperty Text where + asProperty = StrProp + {-# INLINE asProperty #-} + data LoadResult = Loaded Tiledmap | IOErr String | DecodeErr String -- | Load a Tiled map from the given 'FilePath'. -- cgit v1.2.3