mirror of
https://github.com/higherkindness/mu-haskell.git
synced 2024-08-16 18:00:33 +03:00
Support nested types in GRpc methods (#266)
This commit is contained in:
parent
62f9d155b8
commit
c94055c935
@ -86,18 +86,18 @@ pbMethodToType s (P.Method nm vr v rr r _)
|
||||
argToType P.Single (P.TOther ["google","protobuf","Empty"])
|
||||
= [t| '[ ] |]
|
||||
argToType P.Single (P.TOther a)
|
||||
= [t| '[ 'ArgSingle ('Nothing :: Maybe Symbol) ('SchemaRef $(schemaTy s) $(textToStrLit (last a))) ] |]
|
||||
= [t| '[ 'ArgSingle ('Nothing :: Maybe Symbol) ('SchemaRef $(schemaTy s) $(textToStrLit (T.intercalate "." a))) ] |]
|
||||
argToType P.Stream (P.TOther a)
|
||||
= [t| '[ 'ArgStream ('Nothing :: Maybe Symbol) ('SchemaRef $(schemaTy s) $(textToStrLit (last a))) ] |]
|
||||
= [t| '[ 'ArgStream ('Nothing :: Maybe Symbol) ('SchemaRef $(schemaTy s) $(textToStrLit (T.intercalate "." a))) ] |]
|
||||
argToType _ _
|
||||
= fail "only message types may be used as arguments"
|
||||
|
||||
retToType P.Single (P.TOther ["google","protobuf","Empty"])
|
||||
= [t| 'RetNothing |]
|
||||
retToType P.Single (P.TOther a)
|
||||
= [t| 'RetSingle ('SchemaRef $(schemaTy s) $(textToStrLit (last a))) |]
|
||||
= [t| 'RetSingle ('SchemaRef $(schemaTy s) $(textToStrLit (T.intercalate "." a))) |]
|
||||
retToType P.Stream (P.TOther a)
|
||||
= [t| 'RetStream ('SchemaRef $(schemaTy s) $(textToStrLit (last a))) |]
|
||||
= [t| 'RetStream ('SchemaRef $(schemaTy s) $(textToStrLit (T.intercalate "." a))) |]
|
||||
retToType _ _
|
||||
= fail "only message types may be used as results"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user