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
3. Configure your keybindings in your `.vimrc` file. I recommend something
70
+
2. Configure your keybindings in your `.vimrc` file. I recommend something
37
71
like:
38
72
39
73
au FileType haskell nnoremap <buffer> <F1> :HdevtoolsType<CR>
40
-
au FileType haskell nnoremap <buffer> <silent> <F2> :HdevtoolsClear<CR>
74
+
au FileType haskell nnoremap <buffer> <silent> <F2> :HdevtoolsInfo<CR>
75
+
au FileType haskell nnoremap <buffer> <silent> <F3> :HdevtoolsClear<CR>
41
76
42
77
43
78
Features
@@ -61,6 +96,9 @@ The type for the expression under the cursor will be printed, and the
61
96
expression will be highlighted. Repeated presses will expand the expression
62
97
that is examined.
63
98
99
+
To get information from GHC about the identifier under cursor,
100
+
execute `HdevtoolsInfo` (or press the `<F2>` key as configured above).
101
+
64
102
You can execute `HdevtoolsClear` to get rid of the highlighting.
65
103
66
104
Customization
@@ -79,6 +117,12 @@ appropriate (such as your project's `Session.vim`):
79
117
Make sure that each GHC option has its own `-g` prefix (don't group multiple
80
118
options like this: `"-g-isrc\ -Wall"`)
81
119
120
+
I recommend setting the flag to
121
+
[defer GHC type errors to runtime](<https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#deferring-type-errors-to-runtime>),
122
+
so that Haskell expressions can be typechecked even if type errors
123
+
elsewhere in the project would otherwise prevent GHC from compiling.
0 commit comments