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

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

Merged
merged 3 commits into from Jan 6, 2021

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.

@@ -549,7 +549,7 @@ eraseZipSingle f x y = getConst $ metamorph @_ @fs @c @Either
(Left us, Left vs) -> Left (Pair (VApS us) (VApS vs))
_ -> 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 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.

None yet

2 participants