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

Higher-kinded data #41

Merged
merged 9 commits into from
Dec 16, 2019
Merged

Higher-kinded data #41

merged 9 commits into from
Dec 16, 2019

Conversation

serras
Copy link
Collaborator

@serras serras commented Dec 11, 2019

As outlined in #39, I think it's worth investigating whether using HKD help us specify better what our code does. For example, we know that Protocol Buffers mandate that every field is optional: this new design allows us to be explicit about this fact.
In particular, HasSchema now has an additional parameter which is the "wrapper" type. You can set it to a particular type (like done in the health-check example, in which it's set to Maybe), or you can be parametric over it (as done in the examples in core/rpc).

Fixes #39

@serras serras requested a review from kutyel December 11, 2019 19:17
@kutyel kutyel requested a review from cb372 December 12, 2019 11:57
Copy link
Member

@kutyel kutyel left a comment

Choose a reason for hiding this comment

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

Maybes, Maybes everywhere! 🌈

adapter/avro/src/Mu/Adapter/Avro.hs Outdated Show resolved Hide resolved
core/schema/src/Data/Functor/MaybeLike.hs Show resolved Hide resolved
core/schema/src/Mu/Adapter/Json.hs Outdated Show resolved Hide resolved
core/schema/src/Mu/Schema/Conversion/SchemaToTypes.hs Outdated Show resolved Hide resolved
examples/todolist/src/Server.hs Show resolved Hide resolved
@kutyel kutyel changed the title [WIP] Higher-kinded data Higher-kinded data Dec 13, 2019
@kutyel kutyel changed the title Higher-kinded data [WIP] Higher-kinded data Dec 16, 2019
@kutyel kutyel self-requested a review December 16, 2019 11:07
@serras serras merged commit cfd52d9 into master Dec 16, 2019
@serras serras deleted the hkd branch December 16, 2019 12:46
@kutyel kutyel changed the title [WIP] Higher-kinded data Higher-kinded data Dec 17, 2019
kutyel pushed a commit that referenced this pull request Jan 4, 2022
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.

[Design] Use higher-kinded data
3 participants