Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Text.Aspell
Description
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
Synopsis
- data Aspell
- data AspellResponse
- = AllCorrect
- | Mistakes [Mistake]
- data Mistake = Mistake {}
- data AspellOption
- startAspell :: [AspellOption] -> IO (Either String Aspell)
- stopAspell :: Aspell -> IO ()
- askAspell :: Aspell -> Text -> IO [AspellResponse]
- aspellIdentification :: Aspell -> Text
- aspellDictionaries :: IO (Either String [Text])
Documentation
A handle to a running Aspell instance.
data AspellResponse Source #
The kind of responses we can get from Aspell.
Constructors
AllCorrect | The input had no spelling mistakes. |
Mistakes [Mistake] | The input had the specified mistakes. |
Instances
Eq AspellResponse Source # | |
Defined in Text.Aspell Methods (==) :: AspellResponse -> AspellResponse -> Bool # (/=) :: AspellResponse -> AspellResponse -> Bool # | |
Show AspellResponse Source # | |
Defined in Text.Aspell Methods showsPrec :: Int -> AspellResponse -> ShowS # show :: AspellResponse -> String # showList :: [AspellResponse] -> ShowS # |
A spelling mistake.
Constructors
Mistake | |
Fields
|
data AspellOption Source #
An Aspell option.
Constructors
UseDictionary Text | Use the specified dictionary (see |
RawArg Text | Provide a command-line argument directly to |
Instances
Eq AspellOption Source # | |
Defined in Text.Aspell | |
Show AspellOption Source # | |
Defined in Text.Aspell Methods showsPrec :: Int -> AspellOption -> ShowS # show :: AspellOption -> String # showList :: [AspellOption] -> ShowS # |
startAspell :: [AspellOption] -> IO (Either String Aspell) Source #
stopAspell :: Aspell -> IO () Source #
Stop a running Aspell instance.
askAspell :: Aspell -> Text -> IO [AspellResponse] Source #
Submit input text to Aspell for spell-checking. The input text may
contain multiple lines. This returns an AspellResponse
for each
line.
This function is thread-safe and will block until other callers finish.
aspellIdentification :: Aspell -> Text Source #
startup-reported version string