hnix-0.10.1: Haskell implementation of the Nix language
Safe HaskellNone
LanguageHaskell2010

Nix.Effects

Synopsis

Documentation

newtype StorePath Source #

A path into the nix store

Constructors

StorePath 

Instances

Instances details
Convertible e t f m => ToValue StorePath m (NValue' t f m (NValue t f m)) Source # 
Instance details

Defined in Nix.Convert

Methods

toValue :: StorePath -> m (NValue' t f m (NValue t f m)) Source #

class (MonadFile m, MonadStore m, MonadPutStr m, MonadHttp m, MonadEnv m, MonadPaths m, MonadInstantiate m, MonadExec m, MonadIntrospect m) => MonadEffects t f m where Source #

Methods

makeAbsolutePath :: FilePath -> m FilePath Source #

Determine the absolute path of relative path in the current context

findEnvPath :: String -> m FilePath Source #

findPath :: [NValue t f m] -> FilePath -> m FilePath Source #

Having an explicit list of sets corresponding to the NIX_PATH and a file path try to find an existing path

importPath :: FilePath -> m (NValue t f m) Source #

pathToDefaultNix :: FilePath -> m FilePath Source #

derivationStrict :: NValue t f m -> m (NValue t f m) Source #

traceEffect :: String -> m () Source #

Instances

Instances details
(MonadEffects t f m, MonadDataContext f m) => MonadEffects t f (StdIdT m) Source # 
Instance details

Defined in Nix.Fresh.Basic

(MonadFix m, MonadFile m, MonadCatch m, MonadEnv m, MonadPaths m, MonadExec m, MonadHttp m, MonadInstantiate m, MonadIntrospect m, MonadPlus m, MonadPutStr m, MonadStore m, MonadAtomicRef m, Typeable m, Scoped (StdValue m) m, MonadReader (Context m (StdValue m)) m, MonadState (HashMap FilePath NExprLoc) m, MonadDataErrorContext (StdThunk m) (StdCited m) m, MonadThunk (StdThunk m) m (StdValue m), MonadValue (StdValue m) m) => MonadEffects (StdThunk m) (StdCited m) m Source # 
Instance details

Defined in Nix.Standard

class Monad m => MonadIntrospect m where Source #

Minimal complete definition

Nothing

Methods

recursiveSize :: a -> m Word Source #

default recursiveSize :: (MonadTrans t, MonadIntrospect m', m ~ t m') => a -> m Word Source #

Instances

Instances details
MonadIntrospect IO Source # 
Instance details

Defined in Nix.Effects

Methods

recursiveSize :: a -> IO Word Source #

MonadIntrospect m => MonadIntrospect (StdIdT m) Source # 
Instance details

Defined in Nix.Fresh.Basic

Methods

recursiveSize :: a -> StdIdT m Word Source #

MonadIntrospect (t (Fix1 t)) => MonadIntrospect (Fix1 t) Source # 
Instance details

Defined in Nix.Standard

Methods

recursiveSize :: a -> Fix1 t Word Source #

(MonadIntrospect r, MonadIntrospect m) => MonadIntrospect (StandardTF r m) Source # 
Instance details

Defined in Nix.Standard

Methods

recursiveSize :: a -> StandardTF r m Word Source #

MonadIntrospect (t (Fix1T t m) m) => MonadIntrospect (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

Methods

recursiveSize :: a -> Fix1T t m Word Source #

class Monad m => MonadExec m where Source #

Minimal complete definition

Nothing

Methods

exec' :: [String] -> m (Either ErrorCall NExprLoc) Source #

default exec' :: (MonadTrans t, MonadExec m', m ~ t m') => [String] -> m (Either ErrorCall NExprLoc) Source #

Instances

Instances details
MonadExec IO Source # 
Instance details

Defined in Nix.Effects

MonadExec m => MonadExec (StdIdT m) Source # 
Instance details

Defined in Nix.Fresh.Basic

MonadExec (t (Fix1 t)) => MonadExec (Fix1 t) Source # 
Instance details

Defined in Nix.Standard

(MonadExec r, MonadExec m) => MonadExec (StandardTF r m) Source # 
Instance details

Defined in Nix.Standard

MonadExec (t (Fix1T t m) m) => MonadExec (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

class Monad m => MonadInstantiate m where Source #

Minimal complete definition

Nothing

Instances

Instances details
MonadInstantiate IO Source # 
Instance details

Defined in Nix.Effects

MonadInstantiate m => MonadInstantiate (StdIdT m) Source # 
Instance details

Defined in Nix.Fresh.Basic

MonadInstantiate (t (Fix1 t)) => MonadInstantiate (Fix1 t) Source # 
Instance details

Defined in Nix.Standard

(MonadInstantiate r, MonadInstantiate m) => MonadInstantiate (StandardTF r m) Source # 
Instance details

Defined in Nix.Standard

MonadInstantiate (t (Fix1T t m) m) => MonadInstantiate (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

class Monad m => MonadEnv m where Source #

Minimal complete definition

Nothing

Methods

getEnvVar :: String -> m (Maybe String) Source #

default getEnvVar :: (MonadTrans t, MonadEnv m', m ~ t m') => String -> m (Maybe String) Source #

getCurrentSystemOS :: m Text Source #

default getCurrentSystemOS :: (MonadTrans t, MonadEnv m', m ~ t m') => m Text Source #

getCurrentSystemArch :: m Text Source #

default getCurrentSystemArch :: (MonadTrans t, MonadEnv m', m ~ t m') => m Text Source #

class Monad m => MonadPaths m where Source #

Minimal complete definition

Nothing

Methods

getDataDir :: m FilePath Source #

default getDataDir :: (MonadTrans t, MonadPaths m', m ~ t m') => m FilePath Source #

Instances

Instances details
MonadPaths IO Source # 
Instance details

Defined in Nix.Effects

MonadPaths m => MonadPaths (StdIdT m) Source # 
Instance details

Defined in Nix.Fresh.Basic

MonadPaths (t (Fix1 t)) => MonadPaths (Fix1 t) Source # 
Instance details

Defined in Nix.Standard

(MonadPaths r, MonadPaths m) => MonadPaths (StandardTF r m) Source # 
Instance details

Defined in Nix.Standard

MonadPaths (t (Fix1T t m) m) => MonadPaths (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

class Monad m => MonadHttp m where Source #

Minimal complete definition

Nothing

Methods

getURL :: Text -> m (Either ErrorCall StorePath) Source #

default getURL :: (MonadTrans t, MonadHttp m', m ~ t m') => Text -> m (Either ErrorCall StorePath) Source #

Instances

Instances details
MonadHttp IO Source # 
Instance details

Defined in Nix.Effects

MonadHttp m => MonadHttp (StdIdT m) Source # 
Instance details

Defined in Nix.Fresh.Basic

MonadHttp (t (Fix1 t)) => MonadHttp (Fix1 t) Source # 
Instance details

Defined in Nix.Standard

(MonadHttp r, MonadHttp m) => MonadHttp (StandardTF r m) Source # 
Instance details

Defined in Nix.Standard

MonadHttp (t (Fix1T t m) m) => MonadHttp (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

class Monad m => MonadPutStr m where Source #

Minimal complete definition

Nothing

Methods

putStr :: String -> m () Source #

default putStr :: (MonadTrans t, MonadPutStr m', m ~ t m') => String -> m () Source #

Instances

Instances details
MonadPutStr IO Source # 
Instance details

Defined in Nix.Effects

Methods

putStr :: String -> IO () Source #

MonadPutStr m => MonadPutStr (StdIdT m) Source # 
Instance details

Defined in Nix.Fresh.Basic

Methods

putStr :: String -> StdIdT m () Source #

MonadPutStr (t (Fix1 t)) => MonadPutStr (Fix1 t) Source # 
Instance details

Defined in Nix.Standard

Methods

putStr :: String -> Fix1 t () Source #

(MonadPutStr r, MonadPutStr m) => MonadPutStr (StandardTF r m) Source # 
Instance details

Defined in Nix.Standard

Methods

putStr :: String -> StandardTF r m () Source #

MonadPutStr (t (Fix1T t m) m) => MonadPutStr (Fix1T t m) Source # 
Instance details

Defined in Nix.Standard

Methods

putStr :: String -> Fix1T t m () Source #

print :: (MonadPutStr m, Show a) => a -> m () Source #

class Monad m => MonadStore m where Source #

Methods

addPath' :: FilePath -> m (Either ErrorCall StorePath) Source #

Import a path into the nix store, and return the resulting path

toFile_' :: FilePath -> String -> m (Either ErrorCall StorePath) Source #

Add a file with the given name and contents to the nix store