コード例 #1
0
ファイル: LaunchGHC.java プロジェクト: nmr8acme/ideah
 public static List<GHCMessage> compile(
     VirtualFile output, String fileName, @NotNull Module module, boolean tests) {
   try {
     CompilerLocation compiler = CompilerLocation.get(module);
     if (compiler == null) return Collections.emptyList();
     List<String> args =
         compiler.getCompileOptionsList(
             "-m", "Compile", "-s", GHCUtil.rootsAsString(module, tests));
     if (output != null) {
       args.addAll(Arrays.asList("-o", output.getPath()));
     }
     args.add(fileName);
     ProcessLauncher launcher = new ProcessLauncher(false, null, args);
     String stdOut = launcher.getStdOut();
     return parseMessages(stdOut);
   } catch (Exception ex) {
     LOG.error(ex);
     return Collections.singletonList(new GHCMessage(ex.toString(), fileName));
   }
 }
コード例 #2
0
ファイル: GHCDir.java プロジェクト: nmr8acme/ideah
 GHCDir(String name) {
   this.name = name;
   this.version = GHCUtil.getVersion(name);
 }