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

dropMonadZero #61

Merged
merged 3 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 (#60 by @JordanMartinez)
- Drop deprecated `MonadZero` instance (#61 by @JordanMartinez)

New features:
- Added `Semiring` instance (#59)
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
3 changes: 0 additions & 3 deletions src/Data/Maybe.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.Extend (class Extend)
import Control.MonadZero (class MonadZero)
import Control.Plus (class Plus)

import Data.Eq (class Eq1)
Expand Down Expand Up @@ -154,8 +153,6 @@ instance bindMaybe :: Bind Maybe where
-- | ```
instance monadMaybe :: Monad Maybe

instance monadZeroMaybe :: MonadZero Maybe

-- | The `Extend` instance allows sequencing of `Maybe` values and functions
-- | that accept a `Maybe a` and return a non-`Maybe` result using the
-- | `<<=` operator.
Expand Down
7 changes: 4 additions & 3 deletions src/Data/Maybe/First.purs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ module Data.Maybe.First where

import Prelude

import Control.Alt (class Alt)
import Control.Alternative (class Alternative)
import Control.Extend (class Extend)
import Control.MonadZero (class MonadZero, class Alternative, class Plus, class Alt)
import Control.Plus (class Plus)

import Data.Eq (class Eq1)
import Data.Functor.Invariant (class Invariant)
import Data.Maybe (Maybe(..))
Expand Down Expand Up @@ -63,5 +66,3 @@ instance plusFirst :: Plus First where
empty = mempty

instance alternativeFirst :: Alternative First

instance monadZeroFirst :: MonadZero First
6 changes: 3 additions & 3 deletions src/Data/Maybe/Last.purs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ module Data.Maybe.Last where

import Prelude

import Control.Alt (class Alt)
import Control.Alternative (class Alternative)
import Control.Extend (class Extend)
import Control.MonadZero (class MonadZero, class Alternative, class Plus, class Alt)
import Control.Plus (class Plus)
import Data.Eq (class Eq1)
import Data.Functor.Invariant (class Invariant)
import Data.Maybe (Maybe(..))
Expand Down Expand Up @@ -63,5 +65,3 @@ instance plusLast :: Plus Last where
empty = mempty

instance alternativeLast :: Alternative Last

instance monadZeroLast :: MonadZero Last