Sha256: b9f904e0dc0ecbafc45fc1545327302d3690adabefd415ae75019a16d7e47ac0

Contents?: true

Size: 1 KB

Versions: 51

Compression:

Stored size: 1 KB

Contents

open Core
open Yojson.Basic
include Ocaml_special_cases 

type language_config = {
  template_file_name: string;
  default_base_folder: string;
  test_start_marker: string;
  test_end_marker: string;
  version_printer: string -> string;
  edit_expected: stringify: (json -> string) -> slug: string -> value: json -> string;
}

let default_language_config = function
| "ocaml" -> {
    template_file_name = "test.ml"; 
    default_base_folder = "../..";
    test_start_marker = "(* TEST"; 
    test_end_marker = "END TEST";
    version_printer = (fun v -> "(* Test/exercise version: \"" ^ v ^ "\" *)\n\n");
    edit_expected = ocaml_edit_expected;
    }
| "purescript" ->  {
    template_file_name = "Main.purs"; 
    default_base_folder = "../../../xpurescript";
    test_start_marker = "--TEST"; 
    test_end_marker = "--END TEST";
    version_printer = (fun v -> "-- Test/exercise version: \"" ^ v ^ "\"\n\n");
    edit_expected = Purescript_special_cases.edit_expected;
    }
| x -> failwith @@ "unknown language " ^ x

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
trackler-2.2.1.19 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.18 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.17 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.16 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.15 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.14 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.13 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.12 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.11 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.10 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.9 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.8 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.7 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.6 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.5 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.4 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.3 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.2 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.1 tracks/ocaml/tools/test-generator/src/languages.ml
trackler-2.2.1.0 tracks/ocaml/tools/test-generator/src/languages.ml