diff --git a/elisp/ghc-doc.el b/elisp/ghc-doc.el index e90a5a3..ca7d6ac 100644 --- a/elisp/ghc-doc.el +++ b/elisp/ghc-doc.el @@ -22,8 +22,8 @@ (with-temp-buffer (call-process "ghc-pkg" nil t nil "find-module" "--simple-output" mod) (goto-char (point-min)) - (when (looking-at "^\\([^ ]+\\)-[0-9]") - (match-string-no-properties 1)))) + (when (re-search-forward "[^ ]+-[0-9]*\\(\\.[0-9]*\\)*$") + (match-string-no-properties 0)))) (defun ghc-resolve-document-path (pkg) (with-temp-buffer @@ -70,4 +70,4 @@ (if (looking-at "^\\(import\\|module\\) +\\(qualified +\\)?\\([^ (\n]+\\)") (match-string-no-properties 3)))) -(provide 'ghc-doc) \ No newline at end of file +(provide 'ghc-doc)