Comments (4)
Thank you for taking the time to look at it.
I didn’t make progress so far (further than what I published already in the branch)
from servant-checked-exceptions.
I've never actually used NamedRoutes
before.
Could you upload a branch with the (non-working) code you currently have?
from servant-checked-exceptions.
Thanks for your consideration. I took a bit of time to extract what I tried to do from local specificities. You’ll find the attempt here: https://github.com/immae/servant-checked-exceptions/tree/wip-named-routes
I added an "example" file /Movies.hs
(which I use in the repl to play around), using the NamedRoutes example from Servant themselves (https://docs.servant.dev/en/inserting_doc_namedroutes/cookbook/namedRoutes/NamedRoutes.html ), and tried to "build" an api that can Throw from it and add the needed instances. Somehow I got a bit further than what I achieved in my own local work (I have a feeling that the AsEnveloppedServerT
is kind of necessary), but I’m still not there.
Sorry that I cannot help more, It’s easy to get lost in all the Servant types.
Hope this sketch helps a bit!
from servant-checked-exceptions.
I took a look at this, but I don't think I'll have time to grok exactly how Generic
is being used in the implementation of NamedRoutes
, at least to the point where I can use it to implement support here in servant-checked-exceptions
.
For anyone else interested, here is the servant-server
code that deals with NamedRoutes
:
I'd be happy to merge a PR adding support for NamedRoutes
here in servant-checked-exceptions
if someone is able to figure everything out.
from servant-checked-exceptions.
Related Issues (20)
- add note about having to be careful with letting aeson derive FromJSON and ToJSON instances
- Build failure with latest servant libraries HOT 1
- break out union and open-union into separate library HOT 1
- update Servant.Checked.Exceptions.Internal.Servant.Docs to show http error status codes
- break the main Servant.Checked.Exceptions module up into a couple different modules
- add documentation for `ErrStatus` class HOT 1
- possibly write servant cookbook entry for servant-checked-exceptions
- Break into combinator/backend packages HOT 4
- servant-client doesn't return envelopes for non-2xx status codes HOT 4
- How can we perform case analysis on envelopes? HOT 2
- Build failure with servant 0.16 HOT 4
- support servant-0.16 HOT 2
- rewrite servant-checked-exceptions in terms of uverb
- fix doctests on GHC-9 HOT 1
- additional instances of `HasServer` and `HasClient` for Throwing in apis that set Headers HOT 4
- Simplify the From/ToJSON instances for Envelope HOT 11
- Ability to place Throws/Throwing before multiple grouped route definitions
- add some tests to make sure that the HasServer and HasClient instances are correct HOT 1
- add to stackage HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from servant-checked-exceptions.