GeneralCommandLine ghcModVersionCmdLine = new GeneralCommandLine(ghcModPath);
ParametersList ghcModVersionParamsList = ghcModVersionCmdLine.getParametersList();</BUG>
ghcModVersionParamsList.addParametersString(ghcModFlags);
ghcModVersionParamsList.add("--version");
<BUG>String maybeGhcModVersionInfo = ExecUtil.readCommandLine(ghcModVersionCmdLine);

if (maybeGhcModVersionInfo == null) {
NotificationUtil.displayToolsNotification(NotificationType.ERROR, project, "ghc-mod",
"Could not get version info from ghc-mod executable: " + ghcModPath
);</BUG>
return false;

GeneralCommandLine ghcModVersionCmdLine = new GeneralCommandLine(ghcModPath);
ghcModVersionCmdLine.withWorkDirectory(workDir);
ParametersList ghcModVersionParamsList = ghcModVersionCmdLine.getParametersList();
ghcModVersionParamsList.addParametersString(ghcModFlags);
ghcModVersionParamsList.add("--version");
Either<ExecUtil.ExecError, String> ghcModVersionResult = ExecUtil.readCommandLine(ghcModVersionCmdLine);
if (ghcModVersionResult.isLeft()) {
ExecUtil.ExecError e = EitherUtil.unsafeGetLeft(ghcModVersionResult);
NotificationUtil.displayToolsNotification(NotificationType.ERROR, project, "ghc-mod",
e.getMessage()
);
return false;
