<commit_before>package monocle

import org.scalacheck.Arbitrary
import org.scalacheck.Arbitrary.arbitrary
import org.specs2.scalaz.Spec
import scalaz.std.AllInstances._
import scalaz.Equal

class TraversalSpec extends Spec {

  case class Location(latitude: Int, longitude: Int, name: String)

  val locationTraversal = Traversal.apply2[Location, Location, Int, Int](_.latitude)(_.longitude) {
    case (from, newLat, newLong) =>
      from.copy(latitude = newLat, longitude = newLong)
  }

  implicit val locationGen: Arbitrary[Location] = Arbitrary(for {
    x <- arbitrary[Int]
    y <- arbitrary[Int]
    n <- arbitrary[String]
  } yield Location(x, y, n))

  implicit val exampleEq = Equal.equalA[Location]

  checkAll(Traversal.laws(locationTraversal))
<commit_msg>Fix TraversalSpec after apply2 change<commit_after>package monocle

import org.scalacheck.Arbitrary
import org.scalacheck.Arbitrary.arbitrary
import org.specs2.scalaz.Spec
import scalaz.std.AllInstances._
import scalaz.Equal

class TraversalSpec extends Spec {

  case class Location(latitude: Int, longitude: Int, name: String)

  val locationTraversal = Traversal.apply2[Location, Location, Int, Int](_.latitude, _.longitude) {
    case (from, newLat, newLong) =>
      from.copy(latitude = newLat, longitude = newLong)
  }

  implicit val locationGen: Arbitrary[Location] = Arbitrary(for {
    x <- arbitrary[Int]
    y <- arbitrary[Int]
    n <- arbitrary[String]
  } yield Location(x, y, n))

  implicit val exampleEq = Equal.equalA[Location]

  checkAll(Traversal.laws(locationTraversal))

{'fraction_non_alphanumeric': 0.1053639846743295, 'fraction_numerical': 0.0031928480204342275, 'mean_word_length': 4.636690647482014, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '521153', 'n_tokens_mistral': 531, 'n_tokens_neox': 493, 'n_words': 121}