-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Pipe-based interface to the Aspell program
--   
--   A pipe-based interface to the Aspell program (no dynamic linking
--   required).
@package aspell-pipe
@version 0.4


-- | 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
--   
--   <a>http://aspell.net/man-html/Through-A-Pipe.html</a>
module Text.Aspell

-- | A handle to a running Aspell instance.
data Aspell

-- | The kind of responses we can get from Aspell.
data AspellResponse

-- | The input had no spelling mistakes.
AllCorrect :: AspellResponse

-- | The input had the specified mistakes.
Mistakes :: [Mistake] -> AspellResponse

-- | A spelling mistake.
data Mistake
Mistake :: Text -> Int -> Int -> [Text] -> Mistake

-- | The original word in misspelled form.
[mistakeWord] :: Mistake -> Text

-- | The number of alternative correct spellings that were counted.
[mistakeNearMisses] :: Mistake -> Int

-- | The offset, starting at zero, in the original input where this
--   misspelling occurred.
[mistakeOffset] :: Mistake -> Int

-- | The correct spelling alternatives.
[mistakeAlternatives] :: Mistake -> [Text]

-- | An Aspell option.
data AspellOption

-- | Use the specified dictionary (see aspell -d).
UseDictionary :: Text -> AspellOption

-- | Start Aspell with the specified options. Returns either an error
--   message on failure or an Aspell handle on success.
startAspell :: [AspellOption] -> IO (Either String Aspell)

-- | Stop a running Aspell instance.
stopAspell :: Aspell -> IO ()

-- | Submit user input to Aspell for spell-checking. Returns an
--   AspellResponse for each line of user input.
askAspell :: Aspell -> Text -> IO [AspellResponse]

-- | startup-reported version string
aspellIdentification :: Aspell -> Text

-- | Obtain the list of installed Aspell dictionaries.
aspellDictionaries :: IO (Either String [Text])
instance GHC.Classes.Eq Text.Aspell.AspellOption
instance GHC.Show.Show Text.Aspell.AspellOption
instance GHC.Show.Show Text.Aspell.AspellResponse
instance GHC.Classes.Eq Text.Aspell.AspellResponse
instance GHC.Classes.Eq Text.Aspell.Mistake
instance GHC.Show.Show Text.Aspell.Mistake
instance GHC.Show.Show Text.Aspell.Aspell
