summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Main.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Main.hs b/src/Main.hs
index f0af6c1..7884cf9 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NamedFieldPuns #-}
@@ -8,14 +9,13 @@ module Main where
import Data.Maybe (fromMaybe)
import WithCli
-import CheckMap (runLinter)
+import CheckMap (loadAndLintMap)
import Data.Aeson (encode)
import Data.Aeson.Encode.Pretty (encodePretty)
import qualified Data.ByteString.Lazy as LB
import qualified Data.ByteString.Lazy.Encoding as LB
import Data.Text.Lazy as T
import System.IO (utf8)
-import Tiled2
-- | the options this cli tool can take
data Options = Options
@@ -39,10 +39,7 @@ main = withCli run
run :: Options -> IO ()
run options = do
- -- TODO: what if parsing fails and we get Left err?
- Right waMap <- loadTiledmap $ fromMaybe "example.json" (inpath options)
-
- let lints = runLinter waMap
+ lints <- loadAndLintMap (fromMaybe "example.json" (inpath options))
if json options
then printLB