yeshql-core-4.2.0.0: YesQL-style SQL database abstraction (core)

Safe HaskellNone
LanguageHaskell2010

Database.YeshQL.Util

Synopsis

Documentation

headMay :: [a] -> Maybe a Source #

withParsed :: (MonadFail m, Monad m, Show e) => (s -> Either e a) -> (a -> m b) -> s -> m b Source #

class MonadPerformIO m where Source #

Monad in which we can perform IO and tag dependencies. Mostly needed because we cannot easily make a MonadIO instance for Q, and also because we want to avoid a dependency on mtl or transformers. For convenience, we also pull addDependentFile into this typeclass.

Methods

performIO :: IO a -> m a Source #

addDependentFile :: FilePath -> m () Source #

Instances
MonadPerformIO IO Source # 
Instance details

Defined in Database.YeshQL.Util

MonadPerformIO Q Source # 
Instance details

Defined in Database.YeshQL.Util

Methods

performIO :: IO a -> Q a Source #

addDependentFile :: FilePath -> Q () Source #

withParsedFile :: (MonadFail m, MonadPerformIO m, Monad m, Show e) => (String -> Either e a) -> (a -> m b) -> FilePath -> m b Source #