Closed fommil closed 6 years ago
You can't use new
with newtype since it's not a class. Instead, use @newtype case class
so you get a generated .apply
method, or you can use @newtype class
and define your own .apply
method in the companion. Seems like it should work then, although I haven't fully gone through this code.
I'd like to do something like the following, which is a fully compilable version of http://degoes.net/articles/effects-without-transformers
But if I change the value class encoding for
@newtype
, I get a compile error