Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Generalize many kinds, and generalize some constraints from Applicative to Functor.#73

Merged
dwincort merged 3 commits intotarget:masterfrom
strake:generalize
Jan 6, 2021
Merged

Generalize many kinds, and generalize some constraints from Applicative to Functor.#73
dwincort merged 3 commits intotarget:masterfrom
strake:generalize

Conversation

@strake
Copy link
Contributor

@strake strake commented Jan 5, 2021

Hi, it's been a while ☺

I've been playing with the intersection of [polymorphic variants, open recursion, lenses], for which i need this.

Copy link
Collaborator

@dwincort dwincort left a comment

Choose a reason for hiding this comment

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

The change from Applicative to Functor seems like a clear win -- I'm not sure why they were all Applicative if that wasn't necessary, but it's good to make the library more general.

The changes for kinds are a little more frustrating. In general, I like kind signatures as it can make the types a little easier to read, but if we add kind variables, then it messes with type applications. I think making the kinds implicit (as you've done) is probably a win though.

_ -> Right $ Const Nothing

doCons :: forall l (τ :: * -> *) ρ
doCons :: forall l τ ρ
Copy link
Collaborator

Choose a reason for hiding this comment

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

GHC doesn't seem to like this so much, and I'm not quite sure why. Did you get it to type check? Is it something about a change in a newer version of GHC? This library uses many "new" features, but I don't really want it to be so bleeding edge that even GHC from a year ago can't compile it.

Copy link
Collaborator

@dwincort dwincort left a comment

Choose a reason for hiding this comment

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

Good fix!

@dwincort dwincort merged commit 26dbd73 into target:master Jan 6, 2021
@dwincort
Copy link
Collaborator

dwincort commented Jan 6, 2021

There's a little bit of work/bookkeeping I need to do for the next hackage release, but I'll try to get it done in the next week or so :).

@strake strake deleted the generalize branch January 6, 2021 19:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants