improving insertion of type for forall.
This commit is contained in:
parent
6bac8141db
commit
0fd39e9b56
3
Check.hs
3
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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user