-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell bindings to aspell -- -- Haskell bindings to aspell @package haspell @version 1.1.0 module Language.Aspell.Options data ACOption -- | Base name of the dictionary to use. If this option is specified then -- Aspell will either use this dictionary or die. Dictionary :: ByteString -> ACOption -- | Location of the main word list. WordListDir :: ByteString -> ACOption -- | Language to use. It follows the same format of the LANG environment -- variable on most systems. It consists of the two letter ISO 639 -- language code and an optional two letter ISO 3166 country code after a -- dash or underscore. The default value is based on the value of the -- LC_MESSAGES locale. Lang :: ByteString -> ACOption -- | The preferred size of the word list. Size :: WordListSize -> ACOption -- | Personal word list file name. PersonalWordList :: ByteString -> ACOption -- | Replacements list file name. ReplacementsList :: ByteString -> ACOption -- | The encoding the input text is in. When using the Aspell utility the -- default encoding is based on the current locale. Thus if your locale -- currently uses the utf-8 encoding than everything will be in -- UTF-8. Encoding :: Encoding -> ACOption -- | Perform Unicode normalization. Enabled by default. Normalize :: Bool -> ACOption -- | Avoid lossy conversions when normalizing. Lossy conversions includes -- compatibility mappings such as splitting the letter OE -- (U+152) into O and E (when the combined letter is -- not available), and mappings which will remove accents. Disabled by -- default except when creating dictionaries. NormalizeStrict :: Bool -> ACOption -- | The normalization form the output should be in. This option primarily -- effects the normalization form of the suggestions as when spell -- checkering as the actual text is unchanged unless there is an error. -- Valid values are None, NFD for full decomposition -- (Normalization Form D), NFC for Normalization Form C, or -- Composed for fully composed. Composed is like NFC -- except that full composition is used rather than canonical -- composition. The normalize option must be enabled for this option to -- be used. NormalizeForm :: NormalizeForm -> ACOption -- | Set to true when the current language requires Unicode normalization. -- This is generally the case when private use characters are used -- internally by Aspell or when Normalization Form C is not the same as -- full composition. NormalizeRequired :: Bool -> ACOption -- | Ignore words with N characters or less. Ignore :: Integer -> ACOption -- | Ignore commands to store replacement pairs. IgnoreReplace :: Bool -> ACOption -- | Save the replacement word list on save all. SaveReplace :: Bool -> ACOption -- | The base name of the keyboard definition file to use (see -- http://aspell.net/man-html/Notes-on-Typo_002dAnalysis.html#Notes-on-Typo_002dAnalysis). KeyboardDef :: ByteString -> ACOption -- | Suggestion mode = Ultra | Fast | Normal | -- Slow | BadSpeller (see -- http://aspell.net/man-html/Notes-on-the-Different-Suggestion-Modes.html#Notes-on-the-Different-Suggestion-Modes). SuggestMode :: SuggestMode -> ACOption -- | Ignore case when checking words. IgnoreCase :: Bool -> ACOption -- | Ignore accents when checking words (currently ignored). IgnoreAccents :: Bool -> ACOption -- | Sets the filter mode. Possible values include, but not limited to, -- none, url, email, sgml, or -- tex. FilterMode :: ByteString -> ACOption -- | The number of characters that can appear before the quote character. EmailMargin :: Integer -> ACOption -- | Check TeX comments. TeXCheckComments :: Bool -> ACOption -- | Switches the context which should be visible to Aspell. Per default -- the initial context is assumed to be invisible as one would expect -- when spell checking source files of programs where relevant parts are -- contained in string constants and comments but not in the remaining -- code. If set to true the initial context is visible while the -- delimited ones are hidden. ContextVisibleFirst :: Bool -> ACOption -- | Consider run-together words valid. RunTogether :: Bool -> ACOption -- | Maximum number of words that can be strung together. RunTogetherLimit :: Integer -> ACOption -- | Minimal length of interior words. RunTogetherMin :: Integer -> ACOption -- | Main configuration file. This file overrides Aspell's global defaults. MainConfig :: ByteString -> ACOption -- | Location of main configuration file. MainConfigDir :: ByteString -> ACOption -- | Location of language data files. DataDir :: ByteString -> ACOption -- | Alternative location of language data files. This directory is -- searched before DataDir. It defaults to the same directory the -- actual main word list is in (which is not necessary -- Dictionary). LocalDataDir :: ByteString -> ACOption -- | Location for personal files. HomeDir :: ByteString -> ACOption -- | Personal configuration file. This file overrides options found in the -- global MainConfig file. PersonalConfig :: ByteString -> ACOption -- | Use this keyboard layout for suggesting possible words. These spelling -- errors happen if a user accidently presses a key next to the intended -- correct key. The default is keyboard standard. If you are creating -- documents, you may want to set it according to your particular type of -- keyboard. If spellchecking documents created elsewhere, you might want -- to set this to the keyboard type for that locale. If you are not sure, -- just leave this as standard. Layout :: ByteString -> ACOption -- | Prefix directory. Prefix :: ByteString -> ACOption -- | Set the prefix based on executable location (only works on WIN32 and -- when compiled with --enable-win32-relocatable). SetPrefix :: Bool -> ACOption data WordListSize Tiny :: WordListSize ReallySmall :: WordListSize Small :: WordListSize MediumSmall :: WordListSize Medium :: WordListSize MediumLarge :: WordListSize Large :: WordListSize Huge :: WordListSize Insane :: WordListSize data Encoding UTF8 :: Encoding Latin1 :: Encoding data SuggestMode Ultra :: SuggestMode Fast :: SuggestMode Normal :: SuggestMode Slow :: SuggestMode BadSpellers :: SuggestMode data NormalizeForm None :: NormalizeForm NFD :: NormalizeForm NFC :: NormalizeForm Composed :: NormalizeForm module Language.Aspell type SpellChecker = ForeignPtr () -- | Creates a spell checker with default options. -- --
--   spellChecker = spellCheckerWithOptions []
--   
spellChecker :: IO (Either ByteString SpellChecker) -- | Creates a spell checker with a custom set of options. spellCheckerWithOptions :: [ACOption] -> IO (Either ByteString SpellChecker) -- | Convenience function for specifying a dictionary. -- -- You can determine which dictionaries are available to you with -- aspell dump dicts. -- --
--   spellCheckerWithDictionary dict = spellCheckerWithOptions [Dictionary dict]
--   
spellCheckerWithDictionary :: ByteString -> IO (Either ByteString SpellChecker) -- | Checks if a word has been spelled correctly. check :: SpellChecker -> ByteString -> Bool -- | Lists suggestions for misspelled words. -- -- If the input is not misspelled according to the dictionary, returns -- []. suggest :: SpellChecker -> ByteString -> IO [ByteString]