diff --git a/CHANGELOG.md b/CHANGELOG.md index f748c75a..6ed3230c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -106,6 +106,8 @@ The changelog is available [on GitHub][2]. those versions are added to the `allow_failures` section of matrix. _Note:_ For the Stack failure reasons see [this issue](https://github.com/commercialhaskell/stack/issues/4488). +* [#434](https://github.com/kowainik/summoner/issues/434): + Move to `validation-selective`. ## 1.4.0.0 – Dec 25, 2019 🎅 diff --git a/stack.yaml b/stack.yaml index 3e2b6c78..dbec01c1 100644 --- a/stack.yaml +++ b/stack.yaml @@ -7,3 +7,4 @@ packages: extra-deps: - generic-data-0.8.0.0 - hspec-hedgehog-0.0.1.1 + - validation-selective-0.0.0.0 diff --git a/summoner-cli/src/Summoner/CLI.hs b/summoner-cli/src/Summoner/CLI.hs index bf6362ee..e245de1b 100644 --- a/summoner-cli/src/Summoner/CLI.hs +++ b/summoner-cli/src/Summoner/CLI.hs @@ -41,9 +41,9 @@ import Options.Applicative (Parser, ParserInfo, ParserPrefs, argument, command, subparser, subparserInline, switch, value) import Options.Applicative.Help.Chunk (stringChunk) import Relude.Extra.Enum (universe) -import Relude.Extra.Validation (Validation (..)) import System.Directory (doesFileExist) import System.Info (os) +import Validation (Validation (..)) import Summoner.Ansi (errorMessage, infoMessage, successMessage, warningMessage) import Summoner.Config (Config, ConfigP (..), PartialConfig, defaultConfig, finalise, diff --git a/summoner-cli/src/Summoner/Config.hs b/summoner-cli/src/Summoner/Config.hs index 6d2d8260..6e6eab3e 100644 --- a/summoner-cli/src/Summoner/Config.hs +++ b/summoner-cli/src/Summoner/Config.hs @@ -29,9 +29,9 @@ module Summoner.Config import Data.List (lookup) import Generic.Data (gmappend, gmempty) -import Relude.Extra.Validation (Validation (..)) import Shellmet (($?), ($|)) import Toml (Key, TomlBiMap, TomlCodec, (.=)) +import Validation (Validation (..)) import Summoner.CustomPrelude (CustomPrelude (..), customPreludeT) import Summoner.Decision (Decision (..)) diff --git a/summoner-cli/summoner.cabal b/summoner-cli/summoner.cabal index 7be6b3b2..459fd99c 100644 --- a/summoner-cli/summoner.cabal +++ b/summoner-cli/summoner.cabal @@ -74,7 +74,6 @@ common common-options mixins: base hiding (Prelude) , relude (Relude as Prelude , Relude.Extra.Enum - , Relude.Extra.Validation , Relude.Unsafe ) @@ -152,6 +151,7 @@ library , text ^>= 1.2.3.0 , time >= 1.8 && < 1.10 , tomland ^>= 1.2.1.0 + , validation-selective ^>= 0.0.0.0 executable summon import: common-options @@ -187,6 +187,7 @@ test-suite summoner-test , tomland , tree-diff >= 0.0.2 && < 0.2 , summoner + , validation-selective ghc-options: -threaded -rtsopts diff --git a/summoner-cli/test/Test/TomlSpec.hs b/summoner-cli/test/Test/TomlSpec.hs index 5be0720c..3d233d20 100644 --- a/summoner-cli/test/Test/TomlSpec.hs +++ b/summoner-cli/test/Test/TomlSpec.hs @@ -4,10 +4,10 @@ module Test.TomlSpec import Hedgehog (MonadGen, forAll, tripping) import Relude.Extra.Enum (universe) -import Relude.Extra.Validation (Validation (..)) import Test.Hspec (Spec, describe, it, shouldReturn, shouldSatisfy) import Test.Hspec.Hedgehog (hedgehog) import Toml.Bi.Code (decode, encode) +import Validation (Validation (..)) import Summoner.Config (ConfigP (..), PartialConfig, configCodec, defaultConfig, finalise) import Summoner.CustomPrelude (CustomPrelude (..)) diff --git a/summoner-tui/src/Summoner/Tui/Validation.hs b/summoner-tui/src/Summoner/Tui/Validation.hs index 02f070d3..42738eae 100644 --- a/summoner-tui/src/Summoner/Tui/Validation.hs +++ b/summoner-tui/src/Summoner/Tui/Validation.hs @@ -19,7 +19,7 @@ module Summoner.Tui.Validation import Brick.Forms (formState, invalidFields, setFieldValid, setFormFocus) import Lens.Micro (Lens', (%~), (.~), (^.)) import Relude.Extra.Enum (universe) -import Relude.Extra.Validation (Validation (..)) +import Validation (Validation (..)) import Summoner.Text (moduleNameValid, packageNameValid, packageToModule) import Summoner.Tui.Form (KitForm, SummonForm (..), getCurrentFocus, mkForm) diff --git a/summoner-tui/summoner-tui.cabal b/summoner-tui/summoner-tui.cabal index 6d2191a1..c95308b1 100644 --- a/summoner-tui/summoner-tui.cabal +++ b/summoner-tui/summoner-tui.cabal @@ -31,7 +31,6 @@ common common-options mixins: base hiding (Prelude) , relude (Relude as Prelude , Relude.Extra.Enum - , Relude.Extra.Validation ) ghc-options: -Wall -Wcompat @@ -84,6 +83,7 @@ library , microlens-th ^>= 0.4 , summoner ^>= 1.4.0 , text ^>= 1.2.3.0 + , validation-selective ^>= 0.0.0.0 , vty >= 5.25 && < 5.27 executable summon-tui