Gave Parsec errors proper positioning info

This commit is contained in:
Vidar Holen
2012-11-04 18:58:34 -08:00
parent d5587dd104
commit 22ae83e372
3 changed files with 25 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import Shpell.Parser
import Shpell.Analytics
import Data.Maybe
import Text.Parsec.Pos
import Data.List
shpellCheck :: String -> [ShpellComment]
shpellCheck script =
@@ -14,7 +15,7 @@ shpellCheck script =
return $ notesFromMap newMap
)
in
map formatNote $ sortNotes allNotes
map formatNote $ nub $ sortNotes allNotes
data ShpellComment = ShpellComment { shpellLine :: Int, shpellColumn :: Int, shpellSeverity :: String, shpellComment :: String }