Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop deprecated unV #38

Merged
merged 4 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Notable changes to this project are documented in this file. The format is based

Breaking changes:
- Update project and deps to PureScript v0.15.0 (#37 by @JordanMartinez)
- Drop deprecated `unV`; use `validation` instead (#38 by @JordanMartinez)

New features:

Expand Down
6 changes: 0 additions & 6 deletions src/Data/Validation/Semigroup.purs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
module Data.Validation.Semigroup
( V(..)
, validation
, unV
, invalid
, isValid
, toEither
Expand All @@ -24,7 +23,6 @@ import Data.Foldable (class Foldable)
import Data.Ord (class Ord1)
import Data.Traversable (class Traversable)
import Data.Newtype (class Newtype)
import Prim.TypeError (class Warn, Text)

-- | The `V` functor, used for applicative validation
-- |
Expand All @@ -51,10 +49,6 @@ validation :: forall err result r. (err -> r) -> (result -> r) -> V err result -
validation f _ (V (Left err)) = f err
validation _ g (V (Right result)) = g result

-- | Deprecated previous name of `validation`.
unV :: forall err result r. Warn (Text "'unV' is deprecated, use 'validation' instead") => (err -> r) -> (result -> r) -> V err result -> r
unV = validation

-- | Fail with a validation error.
invalid :: forall err result. err -> V err result
invalid = V <<< Left
Expand Down
6 changes: 0 additions & 6 deletions src/Data/Validation/Semiring.purs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
module Data.Validation.Semiring
( V(..)
, validation
, unV
, invalid
, isValid
, toEither
Expand All @@ -23,7 +22,6 @@ import Data.Foldable (class Foldable)
import Data.Ord (class Ord1)
import Data.Traversable (class Traversable)
import Data.Newtype (class Newtype)
import Prim.TypeError (class Warn, Text)

-- | The `V` functor, used for alternative validation
-- |
Expand Down Expand Up @@ -52,10 +50,6 @@ validation :: forall err result r. (err -> r) -> (result -> r) -> V err result -
validation f _ (V (Left err)) = f err
validation _ g (V (Right result)) = g result

-- | Deprecated previous name of `validation`.
unV :: forall err result r. Warn (Text "'unV' is deprecated, use 'validation' instead") => (err -> r) -> (result -> r) -> V err result -> r
unV = validation

-- | Fail with a validation error.
invalid :: forall err result. err -> V err result
invalid = V <<< Left
Expand Down