Skip to content

Commit

Permalink
Trivial function for dumping minimal imports
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdone committed May 18, 2014
1 parent 832fcc6 commit c58058e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions haskell-process.el
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,25 @@ function and remove this comment.
(haskell-process-queue-without-filters (haskell-process)
":set -optP-include -optPdist/build/autogen/cabal_macros.h"))

(defun haskell-process-minimal-imports ()
"Dump minimal imports."
(interactive)
(unless (> (save-excursion
(goto-char (point-min))
(haskell-navigate-imports-go)
(point))
(point))
(goto-char (point-min))
(haskell-navigate-imports-go))
(haskell-process-queue-sync-request (haskell-process)
":set -ddump-minimal-imports")
(haskell-process-load-file)
(insert-file-contents-literally
(concat (haskell-session-current-dir (haskell-session))
"/"
(haskell-guess-module-name)
".imports")))

(provide 'haskell-process)

;; Local Variables:
Expand Down

0 comments on commit c58058e

Please sign in to comment.