Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- queryName :: String -> String -> Name
- queryIdentifier :: String -> String -> String
- ucfirst :: String -> String
- lcfirst :: String -> String
- makeValidIdentifier :: String -> String
- headMay :: [a] -> Maybe a
- nthIdent :: Int -> String
- nameQuery :: String -> ParsedQuery -> ParsedQuery
- nameQueries :: String -> [ParsedQuery] -> [ParsedQuery]
- withParsedQuery :: (MonadPerformIO m, Monad m) => (ParsedQuery -> m a) -> String -> m a
- withParsedQueries :: (MonadPerformIO m, Monad m) => ([ParsedQuery] -> m a) -> String -> m a
- withParsedQueryFile :: (MonadPerformIO m, Monad m) => (ParsedQuery -> m a) -> FilePath -> m a
- withParsedQueriesFile :: (MonadPerformIO m, Monad m) => ([ParsedQuery] -> m a) -> FilePath -> m a
- withParsed :: (Monad m, Show e) => (s -> Either e a) -> (a -> m b) -> s -> m b
- class MonadPerformIO m where
- withParsedFile :: (MonadPerformIO m, Monad m, Show e) => (String -> Either e a) -> (a -> m b) -> FilePath -> m b
Documentation
makeValidIdentifier :: String -> String Source #
nameQuery :: String -> ParsedQuery -> ParsedQuery Source #
nameQueries :: String -> [ParsedQuery] -> [ParsedQuery] Source #
withParsedQuery :: (MonadPerformIO m, Monad m) => (ParsedQuery -> m a) -> String -> m a Source #
withParsedQueries :: (MonadPerformIO m, Monad m) => ([ParsedQuery] -> m a) -> String -> m a Source #
withParsedQueryFile :: (MonadPerformIO m, Monad m) => (ParsedQuery -> m a) -> FilePath -> m a Source #
withParsedQueriesFile :: (MonadPerformIO m, Monad m) => ([ParsedQuery] -> m a) -> FilePath -> m a 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.
Instances
MonadPerformIO IO Source # | |
MonadPerformIO Q Source # | |
withParsedFile :: (MonadPerformIO m, Monad m, Show e) => (String -> Either e a) -> (a -> m b) -> FilePath -> m b Source #