Skip to content

Drop MonadZero instance #43

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

Merged
merged 4 commits into from
Mar 16, 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 (#44 by @JordanMartinez)
- Drop deprecated `MonadZero` instance (#43 by @JordanMartinez)

New features:

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"scripts": {
"clean": "rimraf output && rimraf .pulp-cache",
"build": "pulp build -- --censor-lib --strict --censor-codes='UserDefinedWarning'"
"build": "pulp build -- --censor-lib --strict"
},
"devDependencies": {
"pulp": "16.0.0-0",
Expand Down
7 changes: 2 additions & 5 deletions src/Data/Profunctor/Star.purs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Prelude
import Control.Alt (class Alt, (<|>))
import Control.Alternative (class Alternative)
import Control.MonadPlus (class MonadPlus)
import Control.MonadZero (class MonadZero)
import Control.Plus (class Plus, empty)

import Data.Distributive (class Distributive, distribute, collect)
Expand Down Expand Up @@ -57,8 +56,6 @@ instance plusStar :: Plus f => Plus (Star f a) where

instance alternativeStar :: Alternative f => Alternative (Star f a)

instance monadZeroStar :: MonadZero f => MonadZero (Star f a)

instance monadPlusStar :: MonadPlus f => MonadPlus (Star f a)

instance distributiveStar :: Distributive f => Distributive (Star f a) where
Expand All @@ -69,11 +66,11 @@ instance profunctorStar :: Functor f => Profunctor (Star f) where
dimap f g (Star ft) = Star (f >>> ft >>> map g)

instance strongStar :: Functor f => Strong (Star f) where
first (Star f) = Star \(Tuple s x) -> map (_ `Tuple` x) (f s)
first (Star f) = Star \(Tuple s x) -> map (_ `Tuple` x) (f s)
second (Star f) = Star \(Tuple x s) -> map (Tuple x) (f s)

instance choiceStar :: Applicative f => Choice (Star f) where
left (Star f) = Star $ either (map Left <<< f) (pure <<< Right)
left (Star f) = Star $ either (map Left <<< f) (pure <<< Right)
right (Star f) = Star $ either (pure <<< Left) (map Right <<< f)

instance closedStar :: Distributive f => Closed (Star f) where
Expand Down