Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
A pipe-based interface to Aspell.
This interface is beneficial when dynamic linking against the Aspell library would be undesirable, e.g., for binary portability reasons.
This implementation is based on the description of the Aspell pipe protocol at
- data Aspell
- data AspellResponse
- = AllCorrect
- | Mistakes [Mistake]
- data Mistake = Mistake {}
- data AspellOption = UseDictionary Text
- startAspell :: [AspellOption] -> IO (Either String Aspell)
- stopAspell :: Aspell -> IO ()
- askAspell :: Aspell -> Text -> IO [AspellResponse]
- aspellIdentification :: Aspell -> Text
Documentation
data AspellResponse Source #
The kind of responses we can get from Aspell.
AllCorrect | The input had no spelling mistakes. |
Mistakes [Mistake] | The input had the specified mistakes. |
A spelling mistake.
Mistake | |
|
data AspellOption Source #
An Aspell option.
UseDictionary Text | Use the specified dictionary (see aspell -d). |
startAspell :: [AspellOption] -> IO (Either String Aspell) Source #
Start Aspell with the specified options. Returns either an error message on failure or an Aspell handle on success.
stopAspell :: Aspell -> IO () Source #
Stop a running Aspell instance.
askAspell :: Aspell -> Text -> IO [AspellResponse] Source #
Submit user input to Aspell for spell-checking. Returns an AspellResponse for each line of user input.
aspellIdentification :: Aspell -> Text Source #