-
-
Notifications
You must be signed in to change notification settings - Fork 410
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
server: added Config machinery #327
Conversation
afa6978
to
e8f9bc0
Compare
(NamedConfig subConfig :: NamedConfig "sub" '[Char]) | ||
:. EmptyConfig | ||
subConfig = 'b' :. EmptyConfig | ||
it "allows to extract subconfigs" $ do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to extract
==> extracting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I have purely aesthetic comments - this otherwise LGTM! |
Great work guys. LGTM. |
7e2fb88
to
3c2513c
Compare
There are a few things that still needs to be done:
Should I already merge this so that others can start to work on auth combinators based on this? Or should I wait till we get these done? |
Re documentation, I was assuming the tutorial would be augmented with some paragraphs on basic usage of |
The policy I thought we were aiming for is that |
ddeb8b6
to
8ecc3f0
Compare
@alpmestan: Yeah, the tutorial should include something like that. But that'll be a different repo. (And I don't think we should aim for that being in lockstep with master all the time.) I just didn't want to block work on the auth combinator. But then I'll say this: 8ecc3f0 is a commit that auth combinators can be based on. I'll refrain from |
@soenkehahn thanks, I'll merge that commit and take it from there! |
953ffd8
to
c424fae
Compare
@@ -295,6 +295,13 @@ instance HasForeign lang sublayout => HasForeign lang (Vault :> sublayout) where | |||
foreignFor lang Proxy req = | |||
foreignFor lang (Proxy :: Proxy sublayout) req | |||
|
|||
instance HasForeign lang sublayout => | |||
HasForeign lang (WithNamedConfig name config sublayout) where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't there need to be an instance for (WithNamedConfig name config s) :> sublayout
too?
51bd43a
to
731fd0b
Compare
-- parentesizing): | ||
-- | ||
-- > type UseNamedConfigAPI2 = WithNamedConfig "myConfig" '[String] ( | ||
-- > ReqBody '[JSON] Int) :> Get '[JSON] Int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jkarni: we don't have an instance for that.
(Could this be doctests?)
63fbd00
to
09b2245
Compare
Replacement for #321 with just one commit.