Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Enchant
Description
Binding to the Enchant library.
- type Broker = Ptr Broker'
- brokerDescribe :: Broker -> IO [Provider]
- brokerDictExists :: Broker -> String -> IO Bool
- brokerFree :: Broker -> IO ()
- brokerFreeDict :: Broker -> Dict -> IO ()
- brokerGetError :: Broker -> IO String
- brokerGetParam :: Broker -> String -> IO String
- brokerInit :: IO Broker
- brokerListDicts :: Broker -> IO [Provider]
- brokerRequestDict :: Broker -> String -> IO Dict
- brokerRequestPwlDict :: Broker -> String -> IO Dict
- brokerSetOrdering :: Broker -> String -> String -> IO ()
- brokerSetParam :: Broker -> String -> String -> IO ()
- type Dict = Ptr Dict'
- dictAdd :: Dict -> String -> IO ()
- dictAddToSession :: Dict -> String -> IO ()
- dictCheck :: Dict -> String -> IO Bool
- dictDescribe :: Dict -> IO [Provider]
- dictGetError :: Dict -> IO String
- dictIsAdded :: Dict -> String -> IO Bool
- dictIsRemoved :: Dict -> String -> IO Bool
- dictRemove :: Dict -> String -> IO ()
- dictRemoveFromSession :: Dict -> String -> IO ()
- dictStoreReplacement :: Dict -> String -> String -> IO ()
- dictSuggest :: Dict -> String -> IO [String]
- getVersion :: IO String
- data Provider = Provider {}
- withBroker :: (Broker -> IO a) -> IO a
- withDict :: Broker -> String -> (Dict -> IO a) -> IO a
Documentation
brokerDescribe :: Broker -> IO [Provider] Source #
Enumerates the Enchant providers and tells you some rudimentary information about them.
brokerDictExists :: Broker -> String -> IO Bool Source #
Tells if a dictionary exists or not, using a non-empty tags.
brokerFree :: Broker -> IO () Source #
Frees a broker resource with all its dictionaries.
brokerInit :: IO Broker Source #
Creates a new broker object.
brokerListDicts :: Broker -> IO [Provider] Source #
Returns a list of available dictionaries with their details.
brokerRequestDict :: Broker -> String -> IO Dict Source #
Creates a new dictionary using tag, the non-empty language tag you wish to request a dictionary for ("en_US", "de_DE", ...)
brokerRequestPwlDict :: Broker -> String -> IO Dict Source #
Creates a dictionary using a PWL file. A PWL file is personal word file one word per line.
brokerSetOrdering :: Broker -> String -> String -> IO () Source #
brokerSetOrdering tag ordering
declares a preference of dictionaries to
use for the language described/referred to by tag
. The ordering is a comma
delimited list of provider names. As a special exception, the "*" tag can be
used as a language tag to declare a default ordering for any language that
does not explicitly declare an ordering.
dictAddToSession :: Dict -> String -> IO () Source #
Adds a word to the given dictionary. It will be added only for the active spell-checking session.
dictIsAdded :: Dict -> String -> IO Bool Source #
Returns true if the word is added to the given dictionary.
dictIsRemoved :: Dict -> String -> IO Bool Source #
Returns true if the word is removed from the given dictionary.
dictRemoveFromSession :: Dict -> String -> IO () Source #
Removes the word from the given dictionary. It will be only removed from the active spell-checking session.
dictStoreReplacement :: Dict -> String -> String -> IO () Source #
dictStoreReplacement dict mis cor
adds a correction for mis
using cor
.
Notes that you replaced mis
with cor
, so it's possibly more likely that
future occurrences of mis
will be replaced with cor
. So it might bump
cor
up in the suggestion list.
dictSuggest :: Dict -> String -> IO [String] Source #
Return a list of suggestions if the word is bad spelled.
getVersion :: IO String Source #
Returns the Enchant version.
Information of the Enchant provider
Constructors
Provider | |
Fields
|
withBroker :: (Broker -> IO a) -> IO a Source #
opens a broker using withBroker
actbrokerInit
and passes the resulting broker to the computation act
. The resource
will be freed on exit from withBroker
, whether by normal
termination or by raising an exception.