JS: add warning for unsupported JS files on the command-line?
GHC built with the JS backend supports .js
files passed on the command-line. However any other GHC fails with something like:
❯ ghc-master jsbits/lib.js
/usr/bin/ld.gold: error: jsbits/lib.o:2:1: syntax error, unexpected STRING
/usr/bin/ld.gold: error: jsbits/lib.o: not an object or archive
/tmp/ghc177084_0/ghc_2.o:ghc_1.c:function main: error: undefined reference to 'ZCMain_main_closure'
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
It would be nice to warn the user about unsupported JS files when the target isn't JS and to fail nicely instead.