aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/haskell.js
diff options
context:
space:
mode:
authorMatt Godbolt <matt@godbolt.org>2021-08-14 12:53:52 -0500
committerMatt Godbolt <matt@godbolt.org>2021-08-14 13:06:26 -0500
commit019029c0705a98df9edda8bb5e1db6dcfdb94fcc (patch)
tree40433b13de202513ad9e8e56fefa4f8db2f372e3 /lib/compilers/haskell.js
parent2a3ec250ef6d0395d7e39f875d4d342d3d608c1a (diff)
downloadcompiler-explorer-019029c0705a98df9edda8bb5e1db6dcfdb94fcc.tar.gz
compiler-explorer-019029c0705a98df9edda8bb5e1db6dcfdb94fcc.zip
Support execution and binary mode in haskell. Closes #2854
Diffstat (limited to 'lib/compilers/haskell.js')
-rw-r--r--lib/compilers/haskell.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/compilers/haskell.js b/lib/compilers/haskell.js
index ff6e8249f..e55bb37a4 100644
--- a/lib/compilers/haskell.js
+++ b/lib/compilers/haskell.js
@@ -27,10 +27,23 @@ import { BaseCompiler } from '../base-compiler';
import { ClangParser } from './argument-parsers';
export class HaskellCompiler extends BaseCompiler {
- static get key() { return 'haskell'; }
+ static get key() {
+ return 'haskell';
+ }
optionsForFilter(filters, outputFilename) {
- return ['-S', '-g', '-o', this.filename(outputFilename)];
+ const options = ['-g', '-o', this.filename(outputFilename)];
+ if (!filters.binary)
+ options.unshift('-S');
+ return options;
+ }
+
+ getSharedLibraryPathsAsArguments(libraries) {
+ const libPathFlag = this.compiler.libpathFlag || '-L';
+ return [
+ libPathFlag + '.',
+ ...this.getSharedLibraryPaths(libraries).map(path => libPathFlag + path),
+ ];
}
getArgumentParser() {