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

Document how and why P came to be and the decisions made #115

Open
erikd-ambiata opened this issue Oct 5, 2016 · 4 comments
Open

Document how and why P came to be and the decisions made #115

erikd-ambiata opened this issue Oct 5, 2016 · 4 comments

Comments

@erikd-ambiata
Copy link
Contributor

At ICFP it was suggested that people using custom preludes for commercial work should document how their preludes differ from the official one which may help guide the development of the official prelude.

@jacobstanley
Copy link
Contributor

I don't know if it was intentional or not, but it has decoupled us from churn in the base libraries and has hence provided us with stability across many major versions of GHC.

@erikd-ambiata
Copy link
Contributor Author

The only base problems I can think of are:

  • Applicative becoming a superclass of Monad in ghc 7.10.
  • Foldable/Traversable in ghc 8.0.

both of which are in P. Is there anything else?

@jacobstanley
Copy link
Contributor

Yeah, those are the culprits, and for the most part we can compile across 7.8, 7.10, 8.0 without any CPP in our libraries. I wouldn't say that's the reason for P though, just a happy coincidence.

I think it's more about exposing more general versions of things, and hiding unsafe things. The readme outlines the principles pretty well:

Guidance - "Should it go in p"

  • Is something that is very general & useful, with an obvious semantic and can be implemented from base - YES.
  • If it is unsafe - NO.
  • Is there a more general version - NO.
  • Is it something available in base in only some GHC versions - YES.

@HuwCampbell
Copy link
Contributor

Symbolic mappend and semigroup's (<>) in future. At the moment we're exporting symbolic mappend, but we should be able to change it, which will make using 8.2 and lower less painful.

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

No branches or pull requests

3 participants