You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: docs/Build.md
+31
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,37 @@ Installing `hie` is a multi-step process:
54
54
55
55
This ensures that a complete install is always possible after each `git pull` or a `git clone`.
56
56
57
+
#### Building `hie` with profiling support
58
+
59
+
To build `hie` with profiling enabled `cabal new-install` needs to be used instead of `stack`.
60
+
61
+
Configure `cabal` to enable profiling by setting `profiling: True` in `cabal.project.local` for all packages. If that file does not already exist, create it as follows:
62
+
63
+
```bash
64
+
cat <<EOF > cabal.project.local
65
+
package *
66
+
profiling: True
67
+
EOF
68
+
```
69
+
70
+
Then `hie` can be compiled for a specific GHC version:
The final step is to configure the `hie` client to use a custom `hie-wrapper` script that enables the runtime options for profiling. Such a script could look like this:
80
+
81
+
```bash
82
+
#!/bin/sh
83
+
~/.local/bin/hie-wrapper "$@" +RTS -xc
84
+
```
85
+
86
+
(Note: If no profiling information is shown when using `hie` with a certain project, it may help to build that project itself with profiling support, e.g. `stack build --profile`.)
87
+
57
88
### Safety checks
58
89
59
90
The `install.hs` script performs some checks to ensure that a correct installation is possible and provide meaningful error messages for known issues.
0 commit comments