score:0
eithert
takes a f[either[a, b]]
but you have a free[program, either[error, employee]]
, which is not compatible.
the solution to create a type alias for free[program, a]
:
type myalias[a] = free[program, a]
then make getemployee
return myalias[either[error, employee]]
and same for getaddress
.
Source: stackoverflow.com
Related Query
- Using Free Monad with Either
- Using Either in a Free monad
- Free monad - implicit Inject with nested Coproduct using cats
- Using arbitrary trees with Free Monads in Scala+Cats
- How to use the free monad with Future[M[_]]
- Scala Free Monads with Coproduct and monad transformer
- Missing Functor and Monad instances when using scala.concurrent.Future with EitherT
- Why does this code with free monad interpreter compile?
- Using Free with a non-functor in Scalaz
- Using Sparksql to union two columns with null value in either of them
- Using the Free Monad in Functional Domain Design
- How to fold a sequence with a writer monad embedding a disjunction using combinators?
- Scala: Linux like pipe with error handling using Either
- Scala free monad combining with Doobie
- Scala :: for comprehension and Either with free variables
- How to update a mongo record using Rogue with MongoCaseClassField when case class contains a scala Enumeration
- Class broken error with Joda Time using Scala
- Using Scala traits with implemented methods in Java
- Using Either to process failures in Scala code
- Noise free JSON format for sealed traits with Play 2.2 library
- What's the deal with all the Either cruft?
- Using Eithers with Scala "for" syntax
- Using a Java library with Scala reserved words
- Scala: Using HashMap with a default value
- Using Scala 2.12 with Spark 2.x
- Using Reader Monad for Dependency Injection
- Using partitionBy on a DataFrameWriter writes directory layout with column names not just values
- How to load JSON file using Play with Scala
- Unsupported version error using JTDS with Scala
- Using Auto Incrementing fields with PostgreSQL and Slick
More Query from same tag
- Scala return value not what is expected
- Deserializing JSON with JSON4S
- scala case class copy method is unseen from java code
- Order of method call in Scala trait mixin
- Why doesn't "((left union right) union other)" behave associatively?
- actor:possible to send and receive nested in a receive
- SparkWordCount problem - java.lang.ClassNotFoundException
- How to find the elements present in a list from another list
- Can wildcard anonymous functions be used when parameters are repeating in the result expression?
- How to follow redirects inside test cases?
- Spark Streaming using Scala to insert to Hbase Issue
- TapeEquilibrium ScalaCheck
- Akka + Camel: Wildcard match of Jetty endpoint
- Get auto increment key in scalaquery
- PoisonPill causes dead letters with persistent actor
- How to use saved variable values outside of gatling scenario in scala file
- Spark SQL : is it possible to read the custom schema from an external source instead of creating it in within the spark code?
- Scala : modify values in a TreeMap
- How to convert long hex string to BigInt in scala
- Object creation impossible error when trying to override getListCellRenderComponent method in scala
- Creating an implicit function that wraps map() in Scala with the right type: Not for the faint at heart
- How to parse dynamic json reponse and get specific value and pass it as an input to next request
- How to use Typesafe's Config in Scala with encrypted passwords
- Scala Swing Box Subscribes Multiple Events
- Scalaz: request for use case for Cokleisli composition
- Accessing value by javascript Play Framework/Scala
- How does Akka 2.4.x work in A Cluster Application when I loose one of my nodes
- Table missing headers
- Ask IntelliJ IDEA to open one of my library sources for a given value / class
- costly computation occuring in both isDefined and Apply of a PartialFunction