inserting a module for type.
This commit is contained in:
parent
a16dc3d040
commit
f97cc2e096
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user