In the monomorphic variant, the W type parameter is supplied during creation of an instance of the effect:
// The `W` is explicitly set as `Int`:
case object MyWriter extends WriterEffect[Int]
// The `W` is inferred from the effect instance:
val computation = MyWriter.tell(42)
In the polymorphic variant, the W type parameter is contravariantly inferred at call sites of effect's operations and handlers. In practice, the type can "grow as you go":
case object MyWriter extends PolyWriterEffect
val computation1 = MyWriter.tell(42) // `W` inferred as `Int`
val computation2 = MyWriter.tell("OMG") // `W` inferred as `String`
val computation3 = computation1 &&! computation2 // `W` inferred as `Int | String`
// Inferred types of the above computations:
val _: Unit !! MyWriter.@@[Int] = computation1
val _: Unit !! MyWriter.@@[String] = computation2
val _: Unit !! MyWriter.@@[Int | String] = computation3