fix haddock submodule pointer
[ghc-hetmet.git] / driver / ghci / ghci.c
1
2 #include "cwrapper.h"
3 #include "getLocation.h"
4 #include <stdio.h>
5 #include <stdlib.h>
6
7 int main(int argc, char** argv) {
8     char *binDir;
9     char *exePath;
10     char *preArgv[1];
11
12     if (getenv("_")) {
13         printf("WARNING: GHCi invoked via 'ghci.exe' in *nix-like shells (cygwin-bash, in particular)\n");
14         printf("         doesn't handle Ctrl-C well; use the 'ghcii.sh' shell wrapper instead\n");
15         fflush(stdout);
16     }
17
18     binDir = getExecutablePath();
19     exePath = mkString("%s/ghc.exe", binDir);
20     preArgv[0] = "--interactive";
21
22     run(exePath, 1, preArgv, argc - 1, argv + 1);
23 }
24