Portability | non-portable |
---|---|
Stability | provisional |
Maintainer | Yorick Laupa <yo.eight@gmail.com> |
Safe Haskell | None |
- data Command a
- cmdExec :: Command a -> a -> Connection -> IO ()
- cmdCreateTable :: Command a -> Query
- bigramCommand :: Command Bigram
- trigramCommand :: Command Trigram
- quadgramCommand :: Command Quadgram
- pentagramCommand :: Command Pentagram
- parserBigram :: Parser Bigram
- parserTrigram :: Parser Trigram
- parserQuadgram :: Parser Quadgram
- parserPentagram :: Parser Pentagram
- data ParseException = ParseException !String
- sourceLines :: FilePath -> SourceT (ResourceT IO) Text
- parseLine :: MonadThrow m => Parser a -> ProcessT m Text a
- saveDB :: Bool -> FilePath -> Command a -> ProcessT (ResourceT IO) a ()
- mkProcess :: FilePath -> FilePath -> Bool -> Parser a -> Command a -> ProcessT (ResourceT IO) Text ()
- runProcess_ :: ProcessT (ResourceT IO) Text a -> IO ()
Documentation
cmdExec :: Command a -> a -> Connection -> IO ()Source
cmdCreateTable :: Command a -> QuerySource
bigramCommand :: Command BigramSource
trigramCommand :: Command TrigramSource
quadgramCommand :: Command QuadgramSource
pentagramCommand :: Command PentagramSource
parserBigram :: Parser BigramSource
parserTrigram :: Parser TrigramSource
parserQuadgram :: Parser QuadgramSource
parserPentagram :: Parser PentagramSource
data ParseException Source
sourceLines :: FilePath -> SourceT (ResourceT IO) TextSource
Creates a Source
from the lines of a file, using the ResourceT
monad to ensure the file is closed when processing the stream of lines
is finished
parseLine :: MonadThrow m => Parser a -> ProcessT m Text aSource
Applies a Parser
on each line. If an error occurs, an Exception is
raised
saveDB :: Bool -> FilePath -> Command a -> ProcessT (ResourceT IO) a ()Source
Saves each entry in a SQLite database with submitted Command