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