aspell-pipe-0.6: Pipe-based interface to the Aspell program
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

http://aspell.net/man-html/Through-A-Pipe.html

Synopsis

Documentation

data Aspell Source #

A handle to a running Aspell instance.

Instances

Instances details
Show Aspell Source # 
Instance details

Defined in Text.Aspell

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

Instances details
Eq AspellResponse Source # 
Instance details

Defined in Text.Aspell

Show AspellResponse Source # 
Instance details

Defined in Text.Aspell

data Mistake Source #

A spelling mistake.

Constructors

Mistake 

Fields

Instances

Instances details
Eq Mistake Source # 
Instance details

Defined in Text.Aspell

Methods

(==) :: Mistake -> Mistake -> Bool #

(/=) :: Mistake -> Mistake -> Bool #

Show Mistake Source # 
Instance details

Defined in Text.Aspell

data AspellOption Source #

An Aspell option.

Constructors

UseDictionary Text

Use the specified dictionary (see aspell -d).

RawArg Text

Provide a command-line argument directly to aspell.

Instances

Instances details
Eq AspellOption Source # 
Instance details

Defined in Text.Aspell

Show AspellOption Source # 
Instance details

Defined in Text.Aspell

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.

Any RawArgs provided in the option list are provided to aspell as command-line arguments in the order provided.

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

aspellDictionaries :: IO (Either String [Text]) Source #

Obtain the list of installed Aspell dictionaries.