diff --git a/Check.hs b/Check.hs index c65d090..78a52c3 100644 --- a/Check.hs +++ b/Check.hs @@ -91,7 +91,8 @@ style :: PprStyle style = mkUserStyle neverQualify AllTheWay showSDoc :: SDoc -> String -showSDoc d = map toNull . Pretty.showDocWith ZigZagMode $ d style +--showSDoc d = map toNull . Pretty.showDocWith ZigZagMode $ d style +showSDoc d = map toNull . Pretty.showDocWith PageMode $ d style where toNull '\n' = '\0' toNull x = x diff --git a/elisp/ghc-flymake.el b/elisp/ghc-flymake.el index 403c75c..4d3a292 100644 --- a/elisp/ghc-flymake.el +++ b/elisp/ghc-flymake.el @@ -79,10 +79,10 @@ (dolist (data (ghc-flymake-err-list)) (save-excursion (cond - ((string-match "Inferred type: \\([^:]+ :: \\)\\(forall [^.]+\\. \\)?\\([^\0]*\\)" data) + ((string-match "Inferred type: \\([^:]+ :: \\)\\(forall [^.]+\\.\\( \\|\0 +\\)\\)?\\([^\0]*\\)" data) (beginning-of-line) (insert (match-string 1 data) - (replace-regexp-in-string "\\[Char\\]" "String" (match-string 3 data)) + (replace-regexp-in-string "\\[Char\\]" "String" (match-string 4 data)) "\n")) ((string-match "lacks an accompanying binding" data) (beginning-of-line)