Permalink
Browse files

inferior-haskell-get-module now handles GHC 7.4's `LaTeX

quotes' (closes #11).

Tested in GHC 6.12.3 and GHC 7.4.1.
  • Loading branch information...
chrisdone committed Mar 21, 2012
1 parent c906ee1 commit 7682f991acd63d9400597d5f4980f62d7b1c4c0b
Showing with 6 additions and 1 deletion.
  1. +6 −1 inf-haskell.el
View
@@ -642,7 +642,12 @@ By default this is set to `ghc --print-libdir`/package.conf."
(unless (string-match inferior-haskell-module-re info)
(error
"No documentation information available. Did you forget to C-c C-l?"))
- (match-string-no-properties 1 info)))
+ (let ((module-name (match-string-no-properties 1 info)))
+ ;; Handles GHC 7.4.1+ which quotes module names like
+ ;; `System.Random', whereas previous GHC did not quote at all.
+ (if (string= "`" (substring module-name 0 1))
+ (substring module-name 1 (- (length module-name) 1))
+ module-name))))
(defun inferior-haskell-query-ghc-pkg (&rest args)
"Send ARGS to `haskell-package-manager-name'.

0 comments on commit 7682f99

Please sign in to comment.