Skip to content

Commit

Permalink
Remove deprected aeson-compat and unused dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cblp committed Nov 7, 2024
1 parent e49254d commit 1784652
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
7 changes: 0 additions & 7 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,13 @@ default-extensions:
- ViewPatterns

dependencies:
- aeson-compat >= 0.3.10
- async >= 2.0
- base >= 4.0 && < 5.0
- bytestring >= 0.10
- exceptions
- fsnotify >= 0.3 && < 0.4
- managed >= 1.0.1
- mtl >= 2.2
- regex-tdfa >= 1.2
- semigroups >= 0.16
- stm >= 2.4
- streaming >= 0.1.0 && < 0.3
- text >= 1.2
Expand All @@ -59,7 +56,6 @@ library:
dependencies:
- aeson >= 0.8
- ansi-terminal >= 0.6.2
- containers >= 0.5
- process >= 1.6 && < 1.7
- unix
other-modules: []
Expand All @@ -74,9 +70,6 @@ executables:
- filepath >= 1.3
- optparse-applicative >= 0.11
other-modules: []
when:
- condition: os(darwin)
dependencies: hfsevents >= 0.1.3
ghc-options: -threaded

tests:
Expand Down
6 changes: 2 additions & 4 deletions src/Sos/Rule.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ import Sos.Template

import Control.Applicative
import Control.Monad.Catch (MonadThrow, throwM)
import Data.Aeson.Compat ((.:), FromJSON(..), Parser, Value(..))
import Data.Aeson.Types (typeMismatch)
import Data.Aeson ((.:), FromJSON(..), Value(..))
import Data.Aeson.Types (Parser, typeMismatch)
import Data.ByteString (ByteString)
import Data.ByteString.Internal (c2w)
import Data.Either
import Data.Text (Text)
import Text.Regex.TDFA
import Text.Regex.TDFA.ByteString (compile)

Expand Down Expand Up @@ -118,7 +117,6 @@ instance FromJSON RawRule where
parseCommands :: Parser [RawTemplate]
parseCommands = go ["command", "commands"]

go :: [Text] -> Parser [ByteString]
go = fmap (map Text.encodeUtf8 . listify) . asum . map (o .:)
parseJSON v = typeMismatch "command" v

Expand Down
19 changes: 3 additions & 16 deletions steeloverseer.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.35.0.
-- This file has been generated from package.yaml by hpack version 0.37.0.
--
-- see: https://github.com/sol/hpack

Expand Down Expand Up @@ -55,19 +55,15 @@ library
hspec-discover:hspec-discover
build-depends:
aeson >=0.8
, aeson-compat >=0.3.10
, ansi-terminal >=0.6.2
, async >=2.0
, base >=4.0 && <5.0
, bytestring >=0.10
, containers >=0.5
, exceptions
, fsnotify ==0.3.*
, managed >=1.0.1
, mtl >=2.2
, process ==1.6.*
, regex-tdfa >=1.2
, semigroups >=0.16
, stm >=2.4
, streaming >=0.1.0 && <0.3
, text >=1.2
Expand All @@ -94,28 +90,22 @@ executable sos
build-tool-depends:
hspec-discover:hspec-discover
build-depends:
aeson-compat >=0.3.10
, async >=2.0
async >=2.0
, base >=4.0 && <5.0
, bytestring >=0.10
, directory >=1.2
, exceptions
, filepath >=1.3
, fsnotify ==0.3.*
, managed >=1.0.1
, mtl >=2.2
, optparse-applicative >=0.11
, regex-tdfa >=1.2
, semigroups >=0.16
, steeloverseer
, stm >=2.4
, streaming >=0.1.0 && <0.3
, text >=1.2
, yaml >=0.8
default-language: Haskell2010
if os(darwin)
build-depends:
hfsevents >=0.1.3

test-suite spec
type: exitcode-stdio-1.0
Expand All @@ -140,17 +130,14 @@ test-suite spec
build-tool-depends:
hspec-discover:hspec-discover
build-depends:
aeson-compat >=0.3.10
, async >=2.0
async >=2.0
, base >=4.0 && <5.0
, bytestring >=0.10
, exceptions
, fsnotify ==0.3.*
, hspec
, managed >=1.0.1
, mtl >=2.2
, regex-tdfa >=1.2
, semigroups >=0.16
, steeloverseer
, stm >=2.4
, streaming >=0.1.0 && <0.3
Expand Down

0 comments on commit 1784652

Please sign in to comment.