summaryrefslogtreecommitdiff
path: root/lib/Tiled.hs
diff options
context:
space:
mode:
authorstuebinm2022-02-18 18:09:23 +0100
committerstuebinm2022-02-18 18:09:23 +0100
commit7c49e6c367c9d021f3630c08a4a13ba9abc5df08 (patch)
treec278d23a6e39c353f5aa02d1ce9785122e1eea62 /lib/Tiled.hs
parentfaa244e1a7e760be88054a5f15b3e115ad8e32e5 (diff)
switch to universum prelude
also don't keep adjusted maps around if not necessary
Diffstat (limited to '')
-rw-r--r--lib/Tiled.hs26
1 files changed, 10 insertions, 16 deletions
diff --git a/lib/Tiled.hs b/lib/Tiled.hs
index ab7d4f4..3162dfd 100644
--- a/lib/Tiled.hs
+++ b/lib/Tiled.hs
@@ -17,21 +17,15 @@
-- http://doc.mapeditor.org/en/latest/reference/tmx-map-format/
module Tiled where
-import Control.DeepSeq (NFData)
-import Control.Exception (try)
-import Control.Exception.Base (SomeException)
-import Data.Aeson hiding (Object)
-import qualified Data.Aeson as A
-import Data.Aeson.Types (typeMismatch)
-import qualified Data.ByteString as BS
-import qualified Data.ByteString.Lazy as LB
-import Data.Char (toLower)
-import Data.Map (Map)
-import Data.String (IsString (fromString))
-import Data.Text (Text)
-import qualified Data.Text as T
-import Data.Vector (Vector)
-import GHC.Generics (Generic)
+import Universum
+
+-- TODO: what ever are these aeson imports
+import Data.Aeson hiding (Object)
+import qualified Data.Aeson as A
+import Data.Aeson.Types (typeMismatch)
+import qualified Data.ByteString as BS
+import qualified Data.ByteString.Lazy as LB
+import Data.Char (toLower)
-- | options for Aeson's generic encoding and parsing functions
@@ -68,7 +62,7 @@ data PropertyValue = StrProp Text | BoolProp Bool | IntProp Int | FloatProp Floa
deriving (Eq, Generic, Show, NFData)
instance IsString PropertyValue where
- fromString s = StrProp (T.pack s)
+ fromString s = StrProp (toText s)
instance FromJSON Property where
parseJSON (A.Object o) = do