<commit_before>package uk.gov.homeoffice.json

import scala.reflect.ClassTag
import org.scalactic.{Bad, Good, Or}

trait OrOps {
  def good[R : ClassTag, G, B]: G Or B => R = {
    case Good(r: R) => r
    case Bad(JsonError(_, error, Some(t))) => throw t
    case Bad(e) => throw new Exception(s"Unexpected: $e")<commit_msg>Have to sort out use of ClassTag<commit_after>package uk.gov.homeoffice.json

import scala.reflect.ClassTag
import org.scalactic.{Bad, Good, Or}

trait OrOps {
  /*def good[R : ClassTag, G, B]: G Or B => R = {
    case Good(r: R) => r
    case Bad(JsonError(_, error, Some(t))) => throw t
    case Bad(e) => throw new Exception(s"Unexpected: $e")
  }*/

  def good[R, G, B]: G Or B => R = {
    case Good(r: R) => r
    case Bad(JsonError(_, error, Some(t))) => throw t
    case Bad(e) => throw new Exception(s"Unexpected: $e")
{'fraction_non_alphanumeric': 0.16314553990610328, 'fraction_numerical': 0.0, 'mean_word_length': 3.5614973262032086, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '3948444', 'n_tokens_mistral': 314, 'n_tokens_neox': 312, 'n_words': 99}