diff --git a/std-script/compile b/std-script/compile --- a/std-script/compile +++ b/std-script/compile @@ -31,6 +31,7 @@ PYTHON_INTERPRETER = "/usr/bin/python3" PYTHON_CHECKER = "/usr/bin/pyflakes" PHP_INTERPRETER = "/usr/bin/php" +HASKELL_COMPILER = "/usr/bin/ghc" C_OPTIONS = "-O2 -s -static -std=c99 -DCONTEST -lm -Wall" CPLUSPLUS_OPTIONS = "-O2 -s -std=c++11 -static -DCONTEST -lm -Wall" @@ -38,6 +39,7 @@ JAVA_OPTIONS = "" PYTHON_OPTIONS = "" PHP_OPTIONS = "-l" +HASKELL_OPTIONS = "" # Check for the correct number of arguments. Otherwise, print usage. if ARGV.length == 0 or ARGV.length > 4 @@ -172,6 +174,10 @@ File.chmod(0755, params[:output_file]) end +when "haskell" + command = "#{HASKELL_COMPILER} #{params[:source_file]} -o #{params[:output_file]} #{HASKELL_OPTIONS}" + system(command, err: params[:message_file]) + else talk("ERROR: Invalid language specified!") open(params[:message_file],"w") do |f|