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

Make type families in Data.Row.Internal polykinded #20

Merged
merged 1 commit into from Apr 25, 2018

Conversation

jqyu
Copy link

@jqyu jqyu commented Apr 23, 2018

#19

The primary motivation is to be able to use .== and .+ to construct rows of kinds other than *. Examples.lhs compiles without any changes, however this change is potentially breaking because Forall is now poly-kinded and thus previously working programs may require additional annotations to compile.

The changes to the Forall class seem to be the sole reason why Data.Row.Record and Data.Row.Variants needed to be touched. At a high level it makes sense to me to make said class poly-kinded since we could have something like newtype RecF (r :: Row (* -> *)) (a :: *), newtype VarF (r :: Row (* -> *)) (a :: *) for which we would be able to write instances Forall f Functor => Functor (RecF r), Forall f Functor => Functor (VarF r).

I don't totally understand the type signatures though, so if I messed up anywhere it's probably there.

@strake strake requested review from strake and dwincort April 25, 2018 03:06
@strake
Copy link
Contributor

strake commented Apr 25, 2018

LGTM, @dwincort what say you?

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.

Thanks for putting in the work!

@dwincort dwincort merged commit 4deb283 into target:master Apr 25, 2018
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

3 participants