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
Copy file name to clipboardExpand all lines: haskell-commands.el
+11-4Lines changed: 11 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,12 @@
42
42
:group'haskell
43
43
:type'string)
44
44
45
+
(defcustomhaskell-interactive-set-+c
46
+
t
47
+
"Issue ':set +c' in interactive session to support type introspection."
48
+
:group'haskell-interactive
49
+
:type'boolean)
50
+
45
51
;;;###autoload
46
52
(defunhaskell-process-restart ()
47
53
"Restart the inferior Haskell process."
@@ -101,9 +107,10 @@ You can create new session using function `haskell-session-make'."
101
107
;; whole produces only one prompt marker as a response.
102
108
(haskell-process-send-string process
103
109
(mapconcat#'identity
104
-
'("Prelude.putStrLn \"\""
105
-
":set -v1"
106
-
":set +c") ; :type-at in GHC 8+
110
+
(append '("Prelude.putStrLn \"\""
111
+
":set -v1")
112
+
(when haskell-interactive-set-+c
113
+
'(":set +c"))) ; :type-at in GHC 8+
107
114
"\n"))
108
115
(haskell-process-send-string process ":set prompt \"\\4\"")
109
116
(haskell-process-send-string process (format":set prompt2 \"%s\""
@@ -662,7 +669,7 @@ happened since function invocation)."
662
669
('unknown-command
663
670
(message"This command requires GHCi 8+ or GHCi-ng. Please read command description for details."))
664
671
('option-missing
665
-
(message"Could not infer type signature. You need to load file first. Also :set +c is required. Please read command description for details."))
672
+
(message"Could not infer type signature. You need to load file first. Also :set +c is required, see customization `haskell-interactive-set-+c'. Please read command description for details."))
0 commit comments