BindSyntax migration from 7.0.6 to 7.1

84 views
Skip to first unread message

Mathias Bogaert

unread,
Jan 12, 2015, 10:20:45 AM1/12/15
to sca...@googlegroups.com
Hi,

I'm having a hard time understanding how to migrate Lens binding from 7.0.6 (Scala 2.10) to 7.1 (Scala 2.11).

Our code:

      val s = List(Shift(Monday, 10, 18))
      val u = UserInfo("Walter White", "1231231234", "te...@thing.com", "asdfasdf", "fdsafdsa", s)

      val newEmail = EmailAddress("te...@cool.com")
      val newUser: UserInfo = (UserInfo.nameL := "Gus Fring") >> (UserInfo.emailL := newEmail) >>
                                (UserInfo.scheduleL := List(Shift(Tuesday, 8, 12), Shift(Wednesday, 12, 20))) >>
                                (UserInfo.phoneNumberL := "7897897890") >> (UserInfo.outOfOfficeL := true) exec u

We're seeing the following error:

value >> is not a member of scalaz.IndexedStateT[[+X]X,UserInfo,UserInfo,EmailAddress]
[error]       val newUser: UserInfo = (UserInfo.nameL := "Gus Fring") >> (UserInfo.emailL := newEmail) >>

I think it's due to this change:
https://github.com/scalaz/scalaz/commit/464aa2e94587510bf6ff98db2810dba7a9cf9681

Anyone know how this is should work?

Thanks,

Mathias

David Barri

unread,
Jan 13, 2015, 3:24:58 AM1/13/15
to sca...@googlegroups.com
I've come across the same problem.

David Barri

unread,
Jan 13, 2015, 3:39:43 AM1/13/15
to sca...@googlegroups.com
Oh and FYI, I've only run into this with StateT.
>> works fine on IO and stuff.

Mathias Bogaert

unread,
Jan 13, 2015, 7:04:01 PM1/13/15
to sca...@googlegroups.com
Anyone know how to fix this issue? It also seems it's related to Scala 2.11. Compiles fine for Scala 2.10.
Reply all
Reply to author
Forward
0 new messages