Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions haskell-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,18 @@ PROCESS."

(defun haskell-process-haskell-docs-ident (ident)
"Search with haskell-docs for IDENT, returns a list of modules."
(cl-remove-if-not (lambda (a) (string-match "^[A-Z][A-Za-b0-9_'.]+$" a))
(split-string (shell-command-to-string (concat "haskell-docs --modules " ident))
"\n")))
(cl-remove-if-not
(lambda (a) (string-match "^[[:upper:]][[:alnum:]_'.]+$" a))
(split-string
(with-output-to-string
(with-current-buffer
standard-output
(call-process "haskell-docs"
nil ; no infile
t ; output to current buffer (that is string)
nil ; do not redisplay
"--modules" ident)))
"\n")))

(defun haskell-process-import-modules (process modules)
"Import `modules' with :m +, and send any import statements
Expand Down