ribosome-0.9.9.9: Neovim plugin framework for Polysemy
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ribosome.Interpreter.PersistPath

Description

Interpreters for PersistPath

Synopsis

Documentation

maybeSubdir :: Path b Dir -> Maybe (Path Rel Dir) -> Path b Dir Source #

Append an optional subdir to a dir.

persistPath :: Members [Stop PersistPathError, Embed IO] r => Bool -> Path Abs Dir -> Maybe (Path Rel Dir) -> Sem r (Path Abs Dir) Source #

Append an optional subdir to a dir and ensure existence of the resulting directory if True is given.

interpretPersistPathAt :: Member (Embed IO) r => Bool -> Path Abs Dir -> InterpreterFor (PersistPath !! PersistPathError) r Source #

Interpret PersistPath by using the specified root directory.

xdgCache :: Member (Embed IO) r => Sem r (Maybe (Path Abs Dir)) Source #

Look up the XDG cache directory, returning Nothing if it is unavailable.

interpretPersistPathSetting :: Members [Settings !! SettingError, Embed IO] r => Bool -> Maybe (Path Abs Dir) -> Path Rel Dir -> InterpreterFor (PersistPath !! PersistPathError) r Source #

Interpret PersistPath by reading the global setting for the root directory, or using the given directory if the variable is unset.

The given name is appended to the root, which usually identifies the plugin.

interpretPersistPath :: Members [Settings !! SettingError, Reader PluginName, Error BootError, Embed IO] r => Bool -> InterpreterFor (PersistPath !! PersistPathError) r Source #

Interpret PersistPath by reading the global setting for the root directory, or using the XDG cache directory if the variable is unset.

The plugin name is used as a subdir of the root.

This uses Resumable, see Errors.