Skip to content

Make V Monoid#12

Merged
paf31 merged 2 commits into
purescript:masterfrom
safareli:monoid
Jun 3, 2017
Merged

Make V Monoid#12
paf31 merged 2 commits into
purescript:masterfrom
safareli:monoid

Conversation

@safareli
Copy link
Copy Markdown
Contributor

@safareli safareli commented May 3, 2017

No description provided.

Comment thread src/Data/Validation/Semigroup.purs Outdated
pure = Valid

instance semigroupV :: (Semigroup err, Semigroup a) => Semigroup (V err a) where
append x y = append <$> x <*> y
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use lift2 here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of interest: is lift2 faster?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess not, but difference should be really small right?
Also javascript runtime could optimise lift2 if it's called too often.

Comment thread src/Data/Validation/Semiring.purs Outdated
pure = Valid

instance semigroupV :: (Semiring err, Semigroup a) => Semigroup (V err a) where
append x y = append <$> x <*> y
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

@safareli
Copy link
Copy Markdown
Contributor Author

safareli commented Jun 2, 2017

@paf31 @kritzcreek ping

@paf31 paf31 merged commit f934666 into purescript:master Jun 3, 2017
@paf31
Copy link
Copy Markdown
Contributor

paf31 commented Jun 3, 2017

Thanks!

@safareli safareli deleted the monoid branch June 4, 2017 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants