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