mirror of
https://github.com/serokell/xrefcheck.git
synced 2024-08-16 17:10:26 +03:00
Remove mixins
Problem: Stack cannot build projects with mixins, and they only used to splice universum instead of base. Solution: Use `NoImplicitPreduce` and import `Universum` everywhere explicitly.
This commit is contained in:
parent
d43953192d
commit
2f9a9d8599
@ -5,6 +5,8 @@
|
||||
|
||||
module Main where
|
||||
|
||||
import Universum
|
||||
|
||||
import qualified Data.ByteString as BS
|
||||
import Main.Utf8 (withUtf8)
|
||||
|
||||
|
@ -6,6 +6,8 @@ module Main
|
||||
( main
|
||||
) where
|
||||
|
||||
import Universum
|
||||
|
||||
import Test.Tasty (defaultIngredients, defaultMainWithIngredients, includingOptions)
|
||||
import Test.Tasty.Ingredients (Ingredient)
|
||||
|
||||
|
@ -8,6 +8,8 @@ module Test.Xrefcheck.FtpLinks
|
||||
, test_FtpLinks
|
||||
) where
|
||||
|
||||
import Universum
|
||||
|
||||
import Data.Tagged (Tagged, untag)
|
||||
import Options.Applicative (help, long, strOption)
|
||||
import Test.Tasty (TestTree, askOption, testGroup)
|
||||
|
@ -35,6 +35,7 @@ default-extensions:
|
||||
- MultiParamTypeClasses
|
||||
- MultiWayIf
|
||||
- NamedFieldPuns
|
||||
- NoImplicitPrelude
|
||||
- OverloadedStrings
|
||||
- RankNTypes
|
||||
- RecordWildCards
|
||||
@ -57,9 +58,7 @@ dependencies:
|
||||
- aeson
|
||||
- aeson-casing
|
||||
- async
|
||||
- name: base
|
||||
mixin: [hiding (Prelude)]
|
||||
version: "< 4.15"
|
||||
- base
|
||||
- bytestring
|
||||
- containers
|
||||
- cmark-gfm
|
||||
@ -91,8 +90,7 @@ dependencies:
|
||||
- th-lift-instances
|
||||
- th-utilities
|
||||
- transformers
|
||||
- name: universum
|
||||
mixin: [(Universum as Prelude), (Universum.Unsafe as Unsafe)]
|
||||
- universum
|
||||
- yaml
|
||||
- with-utf8
|
||||
|
||||
|
@ -19,6 +19,8 @@ module Xrefcheck.CLI
|
||||
, getCommand
|
||||
) where
|
||||
|
||||
import Universum
|
||||
|
||||
import qualified Data.Char as C
|
||||
import qualified Data.List as L
|
||||
import qualified Data.Text as T
|
||||
|
@ -7,6 +7,8 @@ module Xrefcheck.Command
|
||||
( defaultAction
|
||||
) where
|
||||
|
||||
import Universum
|
||||
|
||||
import Data.Yaml (decodeFileEither, prettyPrintParseException)
|
||||
import Fmt (blockListF', build, fmt, fmtLn, indentF)
|
||||
import System.Directory (doesFileExist)
|
||||
|
@ -7,7 +7,9 @@
|
||||
|
||||
module Xrefcheck.Config where
|
||||
|
||||
import qualified Unsafe
|
||||
import qualified Universum.Unsafe as Unsafe
|
||||
|
||||
import Universum
|
||||
|
||||
import Control.Exception (assert)
|
||||
import Control.Lens (makeLensesWith)
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
module Xrefcheck.Core where
|
||||
|
||||
import Universum
|
||||
|
||||
import Control.Lens (makeLenses, (%=))
|
||||
import Data.Aeson (FromJSON (..), withText)
|
||||
import Data.Char (isAlphaNum)
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
module Xrefcheck.Orphans () where
|
||||
|
||||
import Universum
|
||||
|
||||
import qualified Data.ByteString.Char8 as C
|
||||
|
||||
import Fmt (Buildable (..), unlinesF, (+|), (|+))
|
||||
|
@ -18,6 +18,8 @@ module Xrefcheck.Progress
|
||||
, putTextRewrite
|
||||
) where
|
||||
|
||||
import Universum
|
||||
|
||||
import Data.Ratio ((%))
|
||||
import System.Console.Pretty (Color (..), Style (..), color, style)
|
||||
import Time (ms, threadDelay)
|
||||
|
@ -16,6 +16,8 @@ module Xrefcheck.Scan
|
||||
, specificFormatsSupport
|
||||
) where
|
||||
|
||||
import Universum
|
||||
|
||||
import Data.Aeson.TH (deriveFromJSON)
|
||||
import qualified Data.Foldable as F
|
||||
import qualified Data.Map as M
|
||||
|
@ -15,6 +15,8 @@ module Xrefcheck.Scanners.Markdown
|
||||
, parseFileInfo
|
||||
) where
|
||||
|
||||
import Universum
|
||||
|
||||
import CMarkGFM (Node (..), NodeType (..), PosInfo (..), commonmarkToNode)
|
||||
import Control.Lens ((%=))
|
||||
import Control.Monad.Trans.Except (Except, runExcept, throwE)
|
||||
|
@ -10,6 +10,8 @@ module Xrefcheck.System
|
||||
, bindGlobPattern
|
||||
) where
|
||||
|
||||
import Universum
|
||||
|
||||
import Data.Aeson (FromJSON (..), withText)
|
||||
import qualified Data.Char as C
|
||||
import GHC.IO.Unsafe (unsafePerformIO)
|
||||
|
@ -13,6 +13,8 @@ module Xrefcheck.Util
|
||||
, aesonConfigOption
|
||||
) where
|
||||
|
||||
import Universum
|
||||
|
||||
import Control.Lens (LensRules, lensField, lensRules, mappingNamer)
|
||||
import qualified Data.Aeson as Aeson
|
||||
import Data.Aeson.Casing (aesonPrefix, camelCase)
|
||||
|
@ -22,6 +22,8 @@ module Xrefcheck.Verify
|
||||
, checkExternalResource
|
||||
) where
|
||||
|
||||
import Universum
|
||||
|
||||
import Control.Concurrent.Async (wait, withAsync)
|
||||
import Control.Exception (throwIO)
|
||||
import Control.Monad.Except (MonadError (..))
|
||||
|
@ -3,6 +3,8 @@
|
||||
- SPDX-License-Identifier: MPL-2.0
|
||||
-}
|
||||
|
||||
import Universum
|
||||
|
||||
import Spec (spec)
|
||||
import Test.Hspec (hspec)
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
module Test.Xrefcheck.AnchorsInHeadersSpec where
|
||||
|
||||
import Universum
|
||||
|
||||
import qualified Data.ByteString.Lazy as BSL
|
||||
import Test.Hspec (Spec, describe, it, shouldBe)
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
module Test.Xrefcheck.AnchorsSpec where
|
||||
|
||||
import Universum
|
||||
|
||||
import Test.Hspec (Spec, describe, it, shouldBe)
|
||||
import Test.QuickCheck ((===))
|
||||
|
||||
|
@ -5,8 +5,11 @@
|
||||
|
||||
module Test.Xrefcheck.ConfigSpec where
|
||||
|
||||
import Universum
|
||||
|
||||
import Control.Concurrent (forkIO, killThread)
|
||||
import qualified Control.Exception as E
|
||||
|
||||
import qualified Data.ByteString as BS
|
||||
import Network.HTTP.Types (Status (..))
|
||||
import Test.Hspec (Spec, before, describe, it, shouldBe)
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
module Test.Xrefcheck.IgnoreAnnotationsSpec where
|
||||
|
||||
import Universum
|
||||
|
||||
import Test.Hspec (Spec, describe, it, shouldBe)
|
||||
|
||||
import Test.Xrefcheck.Util
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
module Test.Xrefcheck.IgnoreRegexSpec where
|
||||
|
||||
import Universum
|
||||
|
||||
import Data.Yaml (decodeEither')
|
||||
import Test.HUnit (assertFailure)
|
||||
import Test.Hspec (Spec, describe, it)
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
module Test.Xrefcheck.LocalSpec where
|
||||
|
||||
import Universum
|
||||
|
||||
import Test.Hspec (Spec, describe, it)
|
||||
import Test.QuickCheck ((===))
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
module Test.Xrefcheck.Util where
|
||||
|
||||
import Universum
|
||||
|
||||
import qualified Data.ByteString.Lazy as BSL
|
||||
import Network.HTTP.Types (forbidden403, unauthorized401)
|
||||
import Web.Firefly (ToResponse (..), route, run)
|
||||
|
Loading…
Reference in New Issue
Block a user