-
Notifications
You must be signed in to change notification settings - Fork 6
The README suggests defining instances related to LangTS and LangTSDecls but these types are not exposed #2
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
Comments
Okay, I exposed those and got the CI green again as of 6110b7a. Does that solve things for you? Let me know and if so I'll make a Hackage release. |
Thanks. Those changes let me write the instances I thought I would need to write. I still haven't managed to generate any output for the non-trivial parts of my API so I'm not sure that I'm on the right track - so I don't know for sure yet whether or not those instances are actually useful to the eventual goal (but it seems like they should be). |
Okay, let me know if I can help, I'm interested in seeing if this library is useful to people. I have some other code I've been meaning to move into this library as well, for generating APIs which use |
Two other things I've bumped into are support for custom request header values (eg for authentication) and handling Servant's At this point, I have gotten some TypeScript code generated using the newly exposed
and maybe they are sometimes but it seems like generating correct output most often need a more precise instance head that involves |
FWIW, when I have some random combinator that doesn't affect the foreign code generation, I do something like the following. This is for the instance (HasForeign lang ftype sublayout) => HasForeign lang ftype (SessionRefresh :> sublayout) where
type Foreign ftype (SessionRefresh :> sublayout) = Foreign ftype sublayout
foreignFor lang pf _ = foreignFor lang pf (Proxy :: Proxy sublayout) |
Btw it looks like |
The "Supporting additional combinators" section gives these examples:
However,
LangTS
andLangTSDecls
are defined inServant.TypeScript.Types
which is not exposed, and they are not re-exported from any exposed module. As a result, support for additional combinators cannot actually be implemented.The text was updated successfully, but these errors were encountered: