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

where's Control.Applicative.Compat #22

Closed
simonmichael opened this issue Apr 22, 2015 · 12 comments
Closed

where's Control.Applicative.Compat #22

simonmichael opened this issue Apr 22, 2015 · 12 comments

Comments

@simonmichael
Copy link

0.8.0 dropped Control.Applicative.Compat. Where can this be found now ? (simonmichael/hledger#245)

@sol
Copy link
Member

sol commented Apr 22, 2015

The orphan instances are in base-orphans now.

Data types in general we dropped for now, as some of the data types that were added to base are already provided by other packages. Here is my stand on this #17 (comment). But I appreciated feedback.

Sent from my iPhone

On 22 Apr 2015, at 11:07 pm, Simon Michael notifications@github.com wrote:

0.8.0 dropped Control.Applicative.Compat. Where can this be found now ?


Reply to this email directly or view it on GitHub.

@RyanGlScott
Copy link
Member

Now that I think about it, I think we forgot to update the changelog to reflect this. It might not hurt to make a 0.8.0.1 release with CHANGES.markdown added to the extra-source-files section of the .cabal file to reduce confusion in the future.

@sol
Copy link
Member

sol commented Apr 22, 2015

Damn! Yes, I missed that. What do you think about linking to the changelog on github instead, for proper markdown formatting?

Sent from my iPhone

On 22 Apr 2015, at 11:40 pm, Ryan Scott notifications@github.com wrote:

Now that I think about it, I think we forgot to update the changelog to reflect this. It might not hurt to make a 0.8.0.1 release with CHANGES.markdown added to the extra-source-files section of the .cabal file to reduce confusion in the future.


Reply to this email directly or view it on GitHub.

@RyanGlScott
Copy link
Member

We could do both. I like having the changelog section of the Hackage page link to something, since that's where I usually look first to get an idea of what changed.

@sol
Copy link
Member

sol commented Apr 22, 2015

Ok, cool, works for me. It's already late here, but I can update the changelog tomorrow, unless you want to take care of it.

Sent from my iPhone

On 23 Apr 2015, at 12:05 am, Ryan Scott notifications@github.com wrote:

We could do both. I like having the changelog section of the Hackage page link to something, since that's where I usually look first to get an idea of what changed.


Reply to this email directly or view it on GitHub.

@simonmichael
Copy link
Author

I was using eg (<*) from Control.Applicative.Compat, which I don't think is in base-orphans ?

@RyanGlScott
Copy link
Member

Ah. In that case, I think you are using Control.Applicative.Compat in a way we weren't quite intending. The purpose of base-compat is to provide a retrofitted version of base that exports functions whose implementations and type signatures match the most recent version of base, without requiring end users to use CPP pragmas to import it. As a result, we only export a .Compat module if there has been changes to functions in that module between versions of base.

In the case of Control.Applicative, nothing inside of the module (related to functions, at least) was changed in base-4.8.0.0, but rather, the Applicative typeclass was reexported from Prelude. Instead of doing something like this:

#if !MIN_VERSION_base(4,8,0)
import Control.Applicative.Compat ((<*))
#endif

why not do this:

import Prelude ()
import Prelude.Compat

You get the same functionality with no CPP pragmas.

@sol
Copy link
Member

sol commented Apr 22, 2015

No, but it's in Control.Applicative for all supported versions of base. Control.Applicative.Compat did not define any functions nor operators. https://github.com/haskell-compat/base-compat/pull/21/files#diff-22b439017b3fdc587c4fd621f6c56078L1

Sent from my iPhone

On 23 Apr 2015, at 12:37 am, Simon Michael notifications@github.com wrote:

I was using eg (<*) from Control.Applicative.Compat, which I don't think is in base-orphans ?


Reply to this email directly or view it on GitHub.

@sol
Copy link
Member

sol commented Apr 22, 2015

why not do this:

import Prelude ()
import Prelude.Compat
Yes, ignore my previous mail. This is what you want.

(Ryan, I edited your code in the quote and removed the import list for Prelude.Compat. That's what you meant, right?)

@simonmichael
Copy link
Author

Yes, I was trying to keep things building before and after GHC 7.10. Clearly it's not as simple as "just use base-compat". Thanks for the hints.

@RyanGlScott
Copy link
Member

We definitely didn't advertise this change as well as we should have, given how substantial it was. (I uploaded base-compat-0.8.0.1 with the changelog highlighted just in case.)

I'll go ahead and close this for now–please let us know if there are other issues in using base-compat-0.8.

@simonmichael
Copy link
Author

All clear now, thank you.

phadej pushed a commit to phadej/base-compat that referenced this issue Dec 11, 2019
…a-constructors

Typeable instances for promoted data constructors
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