packages feed

ghc-mod 0.4.2 → 0.4.3

raw patch · 5 files changed

+18/−25 lines, 5 files

Files

Check.hs view
@@ -91,4 +91,7 @@ style = mkUserStyle neverQualify AllTheWay  showSDoc :: SDoc -> String-showSDoc d = Pretty.showDocWith OneLineMode (d style)+showSDoc d = map toNull . Pretty.showDocWith ZigZagMode $ d style+  where+    toNull '\n' = '\0'+    toNull x = x
elisp/ghc-command.el view
@@ -17,10 +17,6 @@     (ghc-insert-module-template))    ((ghc-flymake-have-errs-p)     (ghc-flymake-insert-from-warning))-   ((save-excursion-      (beginning-of-line)-      (looking-at "^[^ ]+ *::"))-    (ghc-insert-function-template))    (t     (message "Nothing to be done")))) @@ -28,15 +24,6 @@   ;; xxx mod from filename...   (let ((mod (file-name-sans-extension (buffer-name))))     (insert "module " mod " where\n")))--(defun ghc-insert-function-template ()-  (save-excursion-    (beginning-of-line)-    (when (looking-at "^\\([^ ]+\\) *::")-      (save-match-data-	(forward-line)-	(if (eobp) (insert "\n")))-      (insert (match-string 1) " = undefined\n"))))  (defun ghc-sort-lines (beg end)   (interactive "r")
elisp/ghc-comp.el view
@@ -176,11 +176,13 @@  (defun ghc-completion-start-point ()   (save-excursion-    (let ((beg (save-excursion (beginning-of-line) (point))))-      (if (re-search-backward "[ (,`]" beg t) ;; xxx "."+    (let ((beg (save-excursion (beginning-of-line) (point)))+	  (regex (save-excursion+		   (beginning-of-line)+		   (if (looking-at "^import ") "[ (,`]" "[ (,`.]"))))+      (if (re-search-backward regex beg t) 	  (1+ (point)) 	beg))))-  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;
elisp/ghc-flymake.el view
@@ -70,13 +70,7 @@ (defun ghc-flymake-insert-errors (title errs)   (save-excursion     (insert title "\n\n")-    (mapc (lambda (x) (insert (ghc-replace-character x ghc-null ghc-newline) "\n")) errs)-    (goto-char (point-min))-    (while (re-search-forward "In the [^:\n ]+: \\|Expected type: \\|Inferred type: \\|Possible fix: " nil t)-      (replace-match (concat "\n" (match-string 0) "\n    ")))-    (goto-char (point-max))-    (while (re-search-backward "In the [a-z]+ argument\\|In the `" nil t)-      (insert "\n"))))+    (mapc (lambda (x) (insert (ghc-replace-character x ghc-null ghc-newline) "\n")) errs)))  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -90,6 +84,13 @@ 	(insert (match-string 1 data) 		(replace-regexp-in-string "\\[Char\\]" "String" (match-string 3 data)) 		"\n"))+       ((string-match "lacks an accompanying binding" data)+	(beginning-of-line)+	(when (looking-at "^\\([^ ]+\\) *::")+	  (save-match-data+	    (forward-line)+	    (if (eobp) (insert "\n")))+	  (insert (match-string 1) " = undefined\n")))        ((string-match "Not in scope: `\\([^']+\\)'" data) 	(save-match-data 	  (unless (re-search-forward "^$" nil t)
ghc-mod.cabal view
@@ -1,5 +1,5 @@ Name:                   ghc-mod-Version:                0.4.2+Version:                0.4.3 Author:                 Kazu Yamamoto <kazu@iij.ad.jp> Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp> License:                BSD3