<commit_before>
class Exception implements IException {
  constructor(
    public message: string
  ) { }
  getMessage() { return this.message; }
}

class EvaluatedError implements IException {
  constructor(
    public message: any,
    public exception: Maybe<any>
  ) { }
  getMessage() { return this.message; }
}

class NoCurrentProof implements IException {
  getMessage() { return "No current proof."; }
}

class UserError implements IException {
  constructor(
    public e: any,
    public message: any
  ) { }
  getMessage() { return "TODO: UserError"; }
}

export function create(args: any): IException {
  if (typeof args === "string") {
    switch (args) {
      case "NoCurrentProof": return new NoCurrentProof();
      default: debugger;
    }
  }
  const [kind, ...o] = args;
  switch (kind) {
    case "Cerrors.EvaluatedError":
      switch (o.length) {
        case 1: return new EvaluatedError(o[0], nothing());
        case 2: return new EvaluatedError(o[0], just(o[1]));
        default: debugger;
      }
    case "Errors.UserError":
      return new UserError(o[0][0], o[0][1]);
    default:
    switch (o.length) {
      case 0: return new Exception(o[0]);
      default: debugger;
    }
  }
  debugger;
}<commit_msg>disabling some exceptions temporarily<commit_after>
class Exception implements IException {
  constructor(
    public message: string
  ) { }
  getMessage() { return this.message; }
}

class EvaluatedError implements IException {
  constructor(
    public message: any,
    public exception: Maybe<any>
  ) { }
  getMessage() { return this.message; }
}

class NoCurrentProof implements IException {
  getMessage() { return "No current proof."; }
}

class UserError implements IException {
  constructor(
    public e: any,
    public message: any
  ) { }
  getMessage() { return "TODO: UserError"; }
}

/*
Listing shapes supported so far:
[["Anomaly: ..."]]
*/
export function create(args: any): IException {
  if (typeof args === "string") {
    switch (args) {
      // case "NoCurrentProof": return new NoCurrentProof();
      default: debugger;
    }
  }
  switch (args.length) {
    case 1:
      const [error] = args[0];
      return new Exception(error);
    default: debugger;
  }
  // const [[kind, ...o]] = args;
  // if (o[0] === undefined) { debugger; }
  // switch (kind) {
  //   case "Cerrors.EvaluatedError":
  //     switch (o.length) {
  //       case 1: return new EvaluatedError(o[0], nothing());
  //       case 2: return new EvaluatedError(o[0], just(o[1]));
  //       default: debugger;
  //     }
  //   case "Errors.UserError":
  //     return new UserError(o[0][0], o[0][1]);
  //   default:
  //   switch (o.length) {
  //     case 0: return new Exception(o[0]);
  //     default: debugger;
  //   }
  // }
  debugger;
}
{'fraction_non_alphanumeric': 0.1441893830703013, 'fraction_numerical': 0.008967001434720229, 'mean_word_length': 2.7945578231292516, 'pattern_counts': {'":': 6, '<': 5, '<?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': '6943553', 'n_tokens_mistral': 894, 'n_tokens_neox': 883, 'n_words': 243}