-
Notifications
You must be signed in to change notification settings - Fork 68
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
smithy4s.Hints.Key => smithy4s.ShapeTag #85
Conversation
* Extracts the hint key into its own called ShapeTag : it may not be used just for its thing. * Creates a `SchemaIndex` that is a map of `ShapeTag` to `Schema`. * Updates the ProtocolInterface to be constructed with the SchemaIndex instead, which the HintMask is derived This is gonna be tremendously useful for the Dynamic work
@@ -309,7 +309,7 @@ private[codegen] class Renderer(compilationUnit: CompilationUnit) { self => | |||
block( | |||
s"implicit val protocol: smithy4s.Protocol[$name] = new smithy4s.Protocol[$name]" | |||
) { | |||
s"def hintMask: smithy4s.HintMask = smithy4s.HintMask($protocolTraits)" | |||
s"def schemas: smithy4s.SchemaIndex = smithy4s.SchemaIndex($protocolTraits)" |
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.
this looks very promising in general
def withHints[A](fa: F[A], hints: Hints): F[A] | ||
} | ||
|
||
private[smithy4s] class Impl( |
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.
private[smithy4s] class Impl( | |
private[smithy4s] final class Impl( |
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.
case class Binding[A](key: Key[A], value: A) { | ||
def tuple: (Key[A], Binding[A]) = key -> this | ||
case class Binding[A](key: ShapeTag[A], value: A) { | ||
def tuple: (ShapeTag[A], Binding[A]) = key -> this |
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.
if you wanna be fancy... does this work?
def tuple: (ShapeTag[A], Binding[A]) = key -> this | |
def tuple: (ShapeTag[A], this.type) = key -> this |
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.
* Extracts the hint key into its own called ShapeTag : it may not be used just for its hints anymore. * Creates a `SchemaIndex` that is a map of `ShapeTag` to `Schema`. * Updates the ProtocolInterface to be constructed with the SchemaIndex instead, which the HintMask is derived This is gonna be tremendously useful for the Dynamic work
be used just for its hints anymore.
SchemaIndex
that is a map ofShapeTag
toSchema
.instead, which the HintMask is derived
This is gonna be tremendously useful for the Dynamic work