These are chat archives for etorreborre/specs2

Jul 2018
Keir Lawson
Jul 02 2018 20:08
FWIW place I got stuck with trying to implement an IsIterable typeclass as suggested above to give one set of matchers for both Traversables and NonEmptyLists was def containPattern[T](t: =>String) = ContainWithResult(matcherIsValueCheck(new BeMatching(t))) ^^ ((ts: Traversable[T]) => in TraverableMatchers, the need to add a map that returns the exact same type as the input on the typeclass to port this line was made difficult by Traversable needing a CanBuildFrom in order to enable this map that returns the correct type, and NonEmptyList not having an implementation of said type class. I could write an instance of CanBuildFrom for NonEmptyList but it feels like this is gettng quite complicated, don't know if you have any thoughts @etorreborre ?
Eric Torreborre
Jul 02 2018 20:10
It is a bit too late for that now but I will have a look at it tomorrow