Add OCaml
authorSergiu <srg.pscs@gmail.com>
Thu, 21 Jan 2016 04:27:30 +0000 (06:27 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 23 Jan 2016 16:12:13 +0000 (16:12 +0000)
gruntmaster-compile
lib/Gruntmaster/Daemon.pm
t/01-jobs.t
t/problems/hello/tests/ocaml/meta.yml [new file with mode: 0644]
t/problems/hello/tests/ocaml/prog.ml [new file with mode: 0644]

index 0ab18fc..c83a03f 100755 (executable)
@@ -30,6 +30,7 @@ given ($format){
        exec 'go', qw/build -compiler gccgo/, $name, when 'GCCGO';
        exec 'ghc', qw/-DONLINE_JUDGE -Wall -O2 -o/, $basename, $name when 'HASKELL';
        exec 'rustc', qw/-O -o/, $basename, $name when 'RUST';
+       exec 'ocamlc', qw/-o/, $basename, $name when 'OCAML';
 
        when ('BRAINFUCK') {
                system 'bfc', $name and die "bfc failed: errno=$! return=$?";
@@ -118,6 +119,10 @@ Compile commands for each format:
 
   ghc -DONLINE_JUDGE -Wall -O2 -o $output $input
 
+=item OCAML
+
+  ocamlc -o $output $input
+
 =item RUST
 
   rustc -O -o $output $input
index b6d3a52..f37eaf6 100644 (file)
@@ -28,6 +28,7 @@ use constant FORMAT_EXTENSION => {
        JAVA => 'java',
        JULIA => 'jl',
        MONO => 'cs',
+       OCAML => 'ml',
        PASCAL => 'pas',
        PERL => 'pl',
        PHP => 'php',
index 90f7d70..03f4845 100644 (file)
@@ -35,6 +35,7 @@ use constant COMPILER => {
           PYTHON python
           RUBY ruby
           RUST rustc
+          OCAML ocaml
           SBCL sbcl/};
 
 my %needs_fork = map { $_ => 1 } qw/GOLANG GOLFSCRIPT GCCGO JAVA JULIA RUBY/;
diff --git a/t/problems/hello/tests/ocaml/meta.yml b/t/problems/hello/tests/ocaml/meta.yml
new file mode 100644 (file)
index 0000000..b14b550
--- /dev/null
@@ -0,0 +1,7 @@
+test_name: OCaml
+test_description: Hello world in OCaml
+problem: hello
+files:
+  prog:
+    format: OCAML
+    name: prog.ml
diff --git a/t/problems/hello/tests/ocaml/prog.ml b/t/problems/hello/tests/ocaml/prog.ml
new file mode 100644 (file)
index 0000000..4194180
--- /dev/null
@@ -0,0 +1 @@
+print_endline "Hello World!"
This page took 0.023136 seconds and 4 git commands to generate.