Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- run :: MonadWalk m => FilePath -> ([Field [Comment a]], cs) -> m ([Field [Comment a]], cs)
- fields :: MonadWalk m => FilePath -> [Field [Comment a]] -> m [Field [Comment a]]
- field :: MonadWalk m => FilePath -> Field [Comment a] -> m (Field [Comment a])
- stripAnyExtension :: Set String -> FilePath -> Maybe String
- extensions :: Map FieldName (Set String)
- hoistMaybe :: Applicative f => Maybe a -> MaybeT f a
Documentation
run :: MonadWalk m => FilePath -> ([Field [Comment a]], cs) -> m ([Field [Comment a]], cs) Source #
High level wrapper around fields
that makes this action easier to
compose with other actions.
fields :: MonadWalk m => FilePath -> [Field [Comment a]] -> m [Field [Comment a]] Source #
Evaluates pragmas modules within the given fields.
field :: MonadWalk m => FilePath -> Field [Comment a] -> m (Field [Comment a]) Source #
Evaluates pragmas within the given field. Or, if the field is a section, evaluates pragmas recursively within the fields of the section.
If modules are discovered for a field, that fields lines are completely replaced. If anything goes wrong while discovering modules, the original field is returned.
stripAnyExtension :: Set String -> FilePath -> Maybe String Source #
Attempts to strip any of the given extensions from the file path. If any
of them succeed, the result is returned. Otherwise Nothing
is returned.
extensions :: Map FieldName (Set String) Source #
A map from field names to the set of extensions that should be discovered for that field.
hoistMaybe :: Applicative f => Maybe a -> MaybeT f a Source #
This was added in transformers-0.6.0.0
. See
https://hub.darcs.net/ross/transformers/issue/49.