diff --git a/elisp/ghc-check.el b/elisp/ghc-check.el index afc1414..858c5f8 100644 --- a/elisp/ghc-check.el +++ b/elisp/ghc-check.el @@ -171,6 +171,9 @@ (if (not (bolp)) (insert "\n"))) (insert (match-string 1) " = undefined\n"))) ;; GHC 7.8 uses Unicode for single-quotes. + ((string-match "Not in scope: type constructor or class `\\([^'\n\0]+\\)'" data) + (let ((sym (match-string 1 data))) + (ghc-ins-mod sym))) ((string-match "Not in scope: `\\([^'\n\0]+\\)'" data) (let ((sym (match-string 1 data))) (if (y-or-n-p (format "Import module for %s?" sym)) @@ -193,7 +196,7 @@ (delete-region (point) end)) (insert new)))) (t - (message "Nothing is done")))))) + (message "Nothing was done")))))) (defun ghc-extract-type (str) (with-temp-buffer diff --git a/elisp/ghc-func.el b/elisp/ghc-func.el index b3d5491..7fd381a 100644 --- a/elisp/ghc-func.el +++ b/elisp/ghc-func.el @@ -200,8 +200,9 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun ghc-enclose (expr) - (if (string-match "^[a-zA-Z0-9_]$" expr) - expr - (concat "(" expr ")"))) + (let ((case-fold-search nil)) + (if (string-match "^[a-zA-Z0-9_]" expr) + expr + (concat "(" expr ")")))) (provide 'ghc-func)