Skip to content

add Applicative methods#372

Merged
KingoftheHomeless merged 2 commits intopolysemy-research:masterfrom
goertzenator:fixapplicative
Jul 31, 2020
Merged

add Applicative methods#372
KingoftheHomeless merged 2 commits intopolysemy-research:masterfrom
goertzenator:fixapplicative

Conversation

@goertzenator
Copy link
Copy Markdown
Contributor

Add Applicative liftA2, (<*), and (*>) as directed in issue #368 .

Copy link
Copy Markdown
Collaborator

@KingoftheHomeless KingoftheHomeless left a comment

Choose a reason for hiding this comment

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

Thanks!

{-# INLINE (*>) #-}

instance Monad (Sem f) where
return = pure
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you also remove this definition?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

(That is, return = pure)

@KingoftheHomeless KingoftheHomeless linked an issue Jul 30, 2020 that may be closed by this pull request
- add Applicative `liftA2`, `(<*)`, and `(*>)`
- resolves polysemy-research#368
Copy link
Copy Markdown
Collaborator

@KingoftheHomeless KingoftheHomeless left a comment

Choose a reason for hiding this comment

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

Alright, nice. I'm satisfied.

@KingoftheHomeless KingoftheHomeless merged commit de19721 into polysemy-research:master Jul 31, 2020
@goertzenator goertzenator deleted the fixapplicative branch July 31, 2020 13:24
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.

Memory leak with Applicative (*>)

2 participants