Skip to content

Commit

Permalink
[Chore] Do not use deprecated things from Universum
Browse files Browse the repository at this point in the history
Problem: some lens-related things that we use got deprecated in
Universum.
Solution: do not use them, import them from Control.Lens instead.
  • Loading branch information
gromakovsky committed Feb 7, 2024
1 parent 2b1e858 commit f57d93a
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ tests:
- directory
- firefly
- http-types
- lens
- modern-uri
- nyan-interpolation
- o-clock
Expand Down
4 changes: 2 additions & 2 deletions src/Xrefcheck/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ module Xrefcheck.Config
, defConfigText
) where

import Universum
import Universum hiding ((.~))

import Control.Lens (makeLensesWith)
import Control.Lens (makeLensesWith, (.~))
import Data.Aeson (genericParseJSON)
import Data.Yaml (FromJSON (..), decodeEither', prettyPrintParseException, withText)
import Text.Regex.TDFA.Text ()
Expand Down
4 changes: 2 additions & 2 deletions src/Xrefcheck/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

module Xrefcheck.Core where

import Universum
import Universum hiding ((^..))

import Control.Lens (folded, makeLenses, makePrisms, to, united)
import Control.Lens (folded, makeLenses, makePrisms, to, united, (^..))
import Data.Aeson (FromJSON (..), withText)
import Data.Char (isAlphaNum)
import Data.Char qualified as C
Expand Down
4 changes: 2 additions & 2 deletions src/Xrefcheck/Scan.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ module Xrefcheck.Scan
, scanRepo
) where

import Universum
import Universum hiding (_1, (%~))

import Control.Lens (makeLensesWith)
import Control.Lens (_1, makeLensesWith, (%~))
import Data.Aeson (FromJSON (..), genericParseJSON, withText)
import Data.Map qualified as M
import Data.Reflection (Given)
Expand Down
4 changes: 2 additions & 2 deletions src/Xrefcheck/Scanners/Markdown.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ module Xrefcheck.Scanners.Markdown
, makeError
) where

import Universum
import Universum hiding (use)

import CMarkGFM
(Node (..), NodeType (..), PosInfo (..), commonmarkToNode, extAutolink, optFootnotes)
import Control.Lens (_Just, makeLenses, makeLensesFor, (.=))
import Control.Lens (_Just, makeLenses, makeLensesFor, use, (.=))
import Control.Monad.Trans.Writer.CPS (Writer, runWriter, tell)
import Data.Aeson (FromJSON (..), genericParseJSON)
import Data.ByteString.Lazy qualified as BSL
Expand Down
4 changes: 2 additions & 2 deletions src/Xrefcheck/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ module Xrefcheck.Util
, module Xrefcheck.Util.Interpolate
) where

import Universum
import Universum hiding ((.~))

import Control.Lens (LensRules, lensField, lensRules, mappingNamer)
import Control.Lens (LensRules, lensField, lensRules, mappingNamer, (.~))
import Data.Aeson qualified as Aeson
import Data.Aeson.Casing (aesonPrefix, camelCase)
import Data.Fixed (Fixed (MkFixed), HasResolution (resolution))
Expand Down
3 changes: 2 additions & 1 deletion tests/Test/Xrefcheck/IgnoreRegexSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

module Test.Xrefcheck.IgnoreRegexSpec where

import Universum
import Universum hiding ((^.))

import Control.Lens ((^.))
import Data.Reflection (give)
import Data.Yaml (decodeEither')
import Test.Tasty (TestTree, testGroup)
Expand Down

0 comments on commit f57d93a

Please sign in to comment.