-
Notifications
You must be signed in to change notification settings - Fork 34
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
replace all occurrences of @tagless annotation with the manual impl #296
Conversation
Currently, most of the implementaitions only needed the `Handler[F]` type in the companion.
|
||
object GrpcServer { | ||
|
||
trait Handler[G[_]] extends GrpcServer[G] |
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.
In the @tagless
macro of freestyle
, the Handler
alias is useful only if you use the stacksafe
option, in which case the Handler
is both the algebra and an interpreter (natural transformation) from the Op
type, used in the free algebra.
If you do not use the Op
classes, or a Free encoding, you can get rid of the Handler, since it adds nothing.
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.
Cool, thanks for the tip! Changing it
|
||
object TodoListClient { | ||
trait Handler[G[_]] extends TodoListClient[G] |
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.
Same as in my other comment.
|
||
object TodoItemClient { | ||
trait Handler[G[_]] extends TodoItemClient[G] |
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.
Same as in my other comment.
@@ -36,3 +34,7 @@ trait TagClient[F[_]] { | |||
def remove(id: Int): F[Int] | |||
|
|||
} | |||
|
|||
object TagClient { | |||
trait Handler[G[_]] extends TagClient[G] |
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.
Same as here.
trait PingPongClient[F[_]] { | ||
def ping(): F[Unit] | ||
} | ||
|
||
object PingPongClient { | ||
trait Handler[G[_]] extends PingPongClient[G] |
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.
Same as here.
trait RouteGuideClient[F[_]] { | ||
def getFeature(lat: Int, lon: Int): F[Unit] | ||
def listFeatures(lowLat: Int, lowLon: Int, hiLat: Int, hiLon: Int): F[Unit] | ||
def recordRoute(features: List[Feature], numPoints: Int): F[Unit] | ||
def routeChat: F[Unit] | ||
} | ||
|
||
object RouteGuideClient { | ||
trait Handler[G[_]] extends RouteGuideClient[G] |
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.
Same as here.
@@ -165,6 +163,14 @@ object Utils extends CommonUtils { | |||
def bsws(eList: List[E]): F[E] | |||
} | |||
|
|||
object MyRPCClient { | |||
|
|||
trait Handler[G[_]] extends MyRPCClient[G] |
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.
Same as here.
Currently, most of the implementaitions only needed theNot even that :)Handler[F]
type in the companion.
FIXES #292