Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains common utilities for working with importify cache.
- importifyDir :: FilePath
- importifyPath :: Path Rel Dir
- extensionsFile :: FilePath
- extensionsPath :: Path Rel File
- modulesFile :: FilePath
- modulesPath :: Path Rel File
- symbolsDir :: FilePath
- symbolsPath :: Path Rel Dir
- testDataPath :: Path Rel Dir
- decodeFileOrMempty :: forall t m f b. (FromJSON t, Monoid m, MonadIO f) => Path b File -> (t -> f m) -> f m
- doInsideDir :: (MonadIO m, MonadMask m) => Path Abs Dir -> m a -> m a
- findCabalFile :: MonadIO m => Path Abs Dir -> m $ (Maybe $ Path Abs File)
- lookupToRoot :: (Path Abs Dir -> IO Bool) -> Path Rel File -> IO (Maybe (Path Abs Dir, Path Rel File))
Predefined directories
extensionsPath :: Path Rel File Source #
Path to JSON-encoded Map from target to its list of default extensions.
modulesPath :: Path Rel File Source #
Path to file that stores mapping from module names to their packages.
Utility functions to work with files and directories
:: (FromJSON t, Monoid m, MonadIO f) | |
=> Path b File | Path to json data |
-> (t -> f m) | Action from decoded value |
-> f m |
Tries to read file and then decode
it. If either of two phases
fails then mempty
returned and warning is printed to console.
doInsideDir :: (MonadIO m, MonadMask m) => Path Abs Dir -> m a -> m a Source #
Create given directory and perform given action inside it.