diff options
Diffstat (limited to '')
-rw-r--r-- | lib/Tiled2.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Tiled2.hs b/lib/Tiled2.hs index 45b8ad0..3c881ec 100644 --- a/lib/Tiled2.hs +++ b/lib/Tiled2.hs @@ -1,10 +1,10 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE ScopedTypeVariables #-} -- | This module provides Haskell types for Tiled's JSON exports, which you can -- read about at http://doc.mapeditor.org/en/latest/reference/json-map-format/. @@ -325,7 +325,10 @@ instance HasProperties Layer where instance HasProperties Tileset where getProperties = fromMaybe [] . tilesetProperties - +class HasName a where + getName :: a -> Text +instance HasName Layer where + getName = layerName data LoadResult = Loaded Tiledmap | IOErr String | DecodeErr String |