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

Derivation for sum that consists only of singletons #19

Merged
merged 5 commits into from
Jun 16, 2024

Conversation

NPCRUS
Copy link
Contributor

@NPCRUS NPCRUS commented Jun 2, 2024

No description provided.

val showForSimple = summon[Show[Simple]]
println(showForSimple.show(Simple.Second))
// TODO: remove or adjust
val compilationError = summon[Show[Adt]]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should I just leave a happy path for now. I don't see any simple way for now to check that this fails in compile time without failing whole suite

Copy link
Owner

Choose a reason for hiding this comment

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

Leave it as it is for now. I have a compiler plugin which allows you to test things like this by wrapping them in a demilitarize block which captures the compile errors as values, but I haven't published it yet. But it's a matter of days rather than weeks.

@NPCRUS NPCRUS changed the title WIP: Derivation for sum that consists only of singletons Derivation for sum that consists only of singletons Jun 12, 2024
Copy link
Owner

@propensive propensive left a comment

Choose a reason for hiding this comment

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

Looks mostly good, thank you! I haven't commented on the documentation, as I'll probably make a couple of changes to that before I merge, but I'm glad you didn't miss it! I think the changes I mentioned shouldn't be too much work, and if they don't work for some reason, we can just leave things as they are.

val showForSimple = summon[Show[Simple]]
println(showForSimple.show(Simple.Second))
// TODO: remove or adjust
val compilationError = summon[Show[Adt]]
Copy link
Owner

Choose a reason for hiding this comment

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

Leave it as it is for now. I have a compiler plugin which allows you to test things like this by wrapping them in a demilitarize block which captures the compile errors as values, but I haven't published it yet. But it's a matter of days rather than weeks.

@propensive propensive merged commit f6951fc into propensive:main Jun 16, 2024
1 check failed
@NPCRUS NPCRUS deleted the simple-sum-derivation branch November 10, 2024 10:38
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.

3 participants