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

Replace most ToServer instances with a single overlappable instance #11

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

ambroslins
Copy link
Contributor

We can construct a server from every route. However this requires UndecidableInstances and a OVERLAPPABLE pragma.

Not sure if this is actually better, but it does mean we have to don´t have to define extra instances for the ToServer class.

I will just leave this here. Feel free to close it if you don´t like it.

@anton-k
Copy link
Owner

anton-k commented Oct 18, 2023

This is interesting. I need to try it out with examples. As sometimes OVERLAPPABLE-code compiles on the library level. But produces errors on the level of the user code.

@ambroslins
Copy link
Contributor Author

Yes, I am also not sure whether this might cause problems down the line. I just saw that a instance like this should be possible because the other instances are basically all the same.

Btw. I am really excited about this project and also looking forward to contributing. So if you need help with anything just let me know.

Copy link
Owner

@anton-k anton-k left a comment

Choose a reason for hiding this comment

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

We an also remove that instance from the file mig-extra/src/Mig/Extra/Server/Json.hs

@anton-k
Copy link
Owner

anton-k commented Oct 19, 2023

Thank you for support and help poposal.
I keep file todo.md of the things that I'd like to do next. Maybe it would be worth while to convert them to issues.
If you are interested in contribution you can also take some of those items. Some of them are small some of them are really big.

@anton-k
Copy link
Owner

anton-k commented Oct 19, 2023

All examples compile. i think we can merge it.

We can construct a server from every route. However this requires
`UndecidableInstances` and a `OVERLAPPABLE` pragma.
@anton-k anton-k merged commit 2e8ab60 into anton-k:main Oct 19, 2023
1 check passed
@anton-k
Copy link
Owner

anton-k commented Oct 19, 2023

thanks for fix! Merged

@ambroslins ambroslins deleted the overlappable-toServer branch October 19, 2023 12:21
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.

2 participants