Safe Haskell | None |
---|
The module provides functions for working with the binary representation of the historical dictionary of Polish.
- data BinEntry = BinEntry {}
- data Key = Key {}
- data Rule = Rule {}
- proxyForm :: LexEntry -> Text
- binKey :: BinEntry -> Key
- between :: Text -> Key -> Rule
- apply :: Rule -> Text -> Key
- savePolh :: FilePath -> Polh -> IO ()
- loadPolh :: FilePath -> IO (Maybe [BinEntry])
- data PolhT m a
- runPolhT :: MonadIO m => FilePath -> PolhT m a -> m (Maybe a)
- type PolhM a = PolhT IO a
- runPolh :: FilePath -> PolhM a -> IO (Maybe a)
- index :: (Applicative m, MonadIO m) => PolhT m [Key]
- withKey :: (Applicative m, MonadIO m) => Key -> PolhT m (Maybe BinEntry)
- lookup :: (Applicative m, MonadIO m) => Text -> PolhT m [BinEntry]
Documentation
Entry in the binary dictionary consists of the lexical entry and corresponding unique identifier.
A dictionary key which uniquely identifies the lexical entry.
A rule for translating a form into a binary dictionary key.
loadPolh :: FilePath -> IO (Maybe [BinEntry])Source
Load dictionary from a disk in a lazy manner. Return Nothing
if the path doesn't correspond to a binary representation of the
dictionary.
A Polh monad transformer.
MonadTrans PolhT | |
Monad m => Monad (PolhT m) | |
Functor m => Functor (PolhT m) | |
Applicative m => Applicative (PolhT m) | |
MonadIO m => MonadIO (PolhT m) |
runPolhT :: MonadIO m => FilePath -> PolhT m a -> m (Maybe a)Source
Execute the Polh monad transformer against the binary Polh representation located in the given directory. Return Nothing if the directory doesnt' exist or if it doesn't look like a Polh dictionary.
runPolh :: FilePath -> PolhM a -> IO (Maybe a)Source
Execute the Polh monad against the binary Polh representation located in the given directory. Return Nothing if the directory doesnt' exist or if it doesn't look like a Polh dictionary.