State and variance

33 views
Skip to first unread message

Runar Bjarnason

unread,
May 8, 2012, 5:29:00 PM5/8/12
to sca...@googlegroups.com
Is there a very good reason that StateT is not covariant? Having it invariant interferes with type inference in the usual way. But would making it covariant be even worse?

Runar


Jason Zaugg

unread,
May 8, 2012, 5:34:46 PM5/8/12
to sca...@googlegroups.com
I haven't tried, perhaps it's worth an experiment.

In Scalaz 6, State was covariant in A, whereas StateT was invariant.

-jason

Runar Bjarnason

unread,
May 8, 2012, 5:51:28 PM5/8/12
to sca...@googlegroups.com
Right-o, I am experimenting with it now.

Runar



-jason

--
You received this message because you are subscribed to the Google Groups "scalaz" group.
To post to this group, send email to sca...@googlegroups.com.
To unsubscribe from this group, send email to scalaz+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scalaz?hl=en.


Reply all
Reply to author
Forward
0 new messages