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 0ab18fc693a86dc0a72f9779217b8c3ac7514639..c83a03f883911459951b8cd45b616585ef69e143 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 b6d3a522f5935d6585dc612901b1d51634724648..f37eaf6eec4b84658ef333feec2695204386318a 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 90f7d706f1fca3ccc84e767407197d8952ccfe92..03f4845f9111bea3eadc290cd9534543ded8bff6 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.011955 seconds and 4 git commands to generate.