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

Applicative-Monad Proposal fixes. #2

Closed
wants to merge 1 commit into from
Closed

Applicative-Monad Proposal fixes. #2

wants to merge 1 commit into from

Conversation

barrucadu
Copy link

All Monads defined in the code are now Functors and Applicatives, to comply with the applicative-monad proposal.

All praise our Glorious Glasgow overlords!

@barrucadu
Copy link
Author

I agree with the points in that answer, monad transformers are good if they simplify things. For instance, in yukibot I use transformers to avoid explicitly passing around a configuration parameter everywhere. Whilst I haven't looked at the F-lite code much, the monads there all look fairly simple and very different, so I'm not sure transformers would give any benefit.

Regarding 7.10, yes, it works, there's just a compiler warning about the import being redundant. There are, however, other things which don't work in 7.10:

Flite/ParseLib.hs:13:1: Warning:
    Local definition of ‘pure’ clashes with a future Prelude name - this will become an error in GHC 7.10, under the Applicative-Monad Proposal.

Flite/ParseLib.hs:16:3: Warning:
    Local definition of ‘<*>’ clashes with a future Prelude name - this will become an error in GHC 7.10, under the Applicative-Monad Proposal.

Flite/Dependency.hs:33:1: Warning:
    Local definition of ‘join’ clashes with a future Prelude name - this will become an error in GHC 7.10, under the Applicative-Monad Proposal.

Flite/CallGraph.hs:26:1: Warning:
    Local definition of ‘join’ clashes with a future Prelude name - this will become an error in GHC 7.10, under the Applicative-Monad Proposal.

If ParseLib gets dropped (as mused over in #1), the first two are a non-issue. For the latter two, I'm not sure if it would be better to just shadow the Prelude join, or to change the names of the functions.

@barrucadu barrucadu closed this Apr 20, 2021
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.

1 participant