xrefcheck/exec/Main.hs
Kirill Andreev 92c3de5587
Improve readability of imports
Problem:  In
          ```
          import qualified Foo.Bar as Bar
          import Foo.Bar (Bar)
          ```
          names of the imported modules are on different
          vertical lines, which disables autosorting,
          and makes it harder to read.

Solution: Use `ImportQualifiedPost`
2021-11-01 15:25:29 +04:00

25 lines
563 B
Haskell

{- SPDX-FileCopyrightText: 2018-2019 Serokell <https://serokell.io>
-
- SPDX-License-Identifier: MPL-2.0
-}
module Main where
import Universum
import Data.ByteString qualified as BS
import Main.Utf8 (withUtf8)
import Xrefcheck.CLI (Command (..), getCommand)
import Xrefcheck.Command (defaultAction)
import Xrefcheck.Config (defConfigText)
main :: IO ()
main = withUtf8 $ do
command <- getCommand
case command of
DefaultCommand options ->
defaultAction options
DumpConfig repoType path ->
BS.writeFile path (defConfigText repoType)