Giter Site home page Giter Site logo

Comments (4)

immae avatar immae commented on June 8, 2024 1

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.

cdepillabout avatar cdepillabout commented on June 8, 2024

I've never actually used NamedRoutes before.

Could you upload a branch with the (non-working) code you currently have?

from servant-checked-exceptions.

immae avatar immae commented on June 8, 2024

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.

cdepillabout avatar cdepillabout commented on June 8, 2024

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:

https://hackage.haskell.org/package/servant-server-0.20/docs/src/Servant.Server.Internal.html#AsServerT

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.