<commit_before>package thx;

import thx.Semigroup;
import thx.fp.Comparable;
import thx.fp.ComparableOrd;

abstract Ordering(OrderingImpl) from OrderingImpl to OrderingImpl {
  public static function fromInt(value : Int) : Ordering
    return value < 0 ? LT : (value > 0 ? GT : EQ);

  public static function fromFloat(value : Float) : Ordering
    return value < 0 ? LT : (value > 0 ? GT : EQ);

  public function toInt() : Int
    return switch this {
      case LT: -1;
      case GT: 1;
      case EQ: 0;
    };
}

enum OrderingImpl {
  LT; GT; EQ;
}

@:callable<commit_msg>Add Monoid<Ordering><commit_after>package thx;

import thx.Semigroup;
import thx.fp.Comparable;
import thx.fp.ComparableOrd;

abstract Ordering(OrderingImpl) from OrderingImpl to OrderingImpl {
  public static function fromInt(value : Int) : Ordering
    return value < 0 ? LT : (value > 0 ? GT : EQ);

  public static function fromFloat(value : Float) : Ordering
    return value < 0 ? LT : (value > 0 ? GT : EQ);

  public function toInt() : Int
    return switch this {
      case LT: -1;
      case GT: 1;
      case EQ: 0;
    };
}

enum OrderingImpl {
  LT; GT; EQ;
}

class Orderings {
  public static var monoid(default, never): Monoid<Ordering> = {
    zero: EQ,
    append: function(o0: Ordering, o1: Ordering): Ordering return switch o0 {
      case LT: LT;
      case EQ: o1;
      case GT: GT;
    }
  };
}

@:callable
{'fraction_non_alphanumeric': 0.11000709723207949, 'fraction_numerical': 0.0127750177430802, 'mean_word_length': 3.0056818181818183, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7007754', 'n_tokens_mistral': 515, 'n_tokens_neox': 476, 'n_words': 156}