diff options
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Main.hs b/src/Main.hs index 7884cf9..969fa10 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,21 +1,22 @@ -{-# LANGUAGE LambdaCase #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} module Main where -import Data.Maybe (fromMaybe) -import WithCli - -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.Maybe (fromMaybe) import Data.Text.Lazy as T import System.IO (utf8) +import WithCli + +import CheckMap (loadAndLintMap) +import Util (printPretty) -- | the options this cli tool can take data Options = Options @@ -44,7 +45,7 @@ run options = do if json options then printLB $ if pretty options then encodePretty lints else encode lints - else print lints + else printPretty lints -- | haskell's many string types are FUN … printLB :: LB.ByteString -> IO () |