niv-0.2.21: Easy dependency management for Nix projects
Safe HaskellNone
LanguageHaskell2010

Niv.Cli

Synopsis

Documentation

newtype NIO a Source #

Constructors

NIO 

Instances

Instances details
Monad NIO Source # 
Instance details

Defined in Niv.Cli

Methods

(>>=) :: NIO a -> (a -> NIO b) -> NIO b #

(>>) :: NIO a -> NIO b -> NIO b #

return :: a -> NIO a #

Functor NIO Source # 
Instance details

Defined in Niv.Cli

Methods

fmap :: (a -> b) -> NIO a -> NIO b #

(<$) :: a -> NIO b -> NIO a #

Applicative NIO Source # 
Instance details

Defined in Niv.Cli

Methods

pure :: a -> NIO a #

(<*>) :: NIO (a -> b) -> NIO a -> NIO b #

liftA2 :: (a -> b -> c) -> NIO a -> NIO b -> NIO c #

(*>) :: NIO a -> NIO b -> NIO b #

(<*) :: NIO a -> NIO b -> NIO a #

MonadIO NIO Source # 
Instance details

Defined in Niv.Cli

Methods

liftIO :: IO a -> NIO a #

MonadUnliftIO NIO Source # 
Instance details

Defined in Niv.Cli

Methods

withRunInIO :: ((forall a. NIO a -> IO a) -> IO b) -> NIO b #

MonadReader FindSourcesJson NIO Source # 
Instance details

Defined in Niv.Cli

li :: MonadIO io => IO a -> io a Source #

cli :: IO () Source #

data FetchNixpkgs Source #

Whether or not to fetch nixpkgs

Instances

Instances details
Show FetchNixpkgs Source # 
Instance details

Defined in Niv.Cli

data Nixpkgs Source #

Constructors

Nixpkgs Text Text 

Instances

Instances details
Show Nixpkgs Source # 
Instance details

Defined in Niv.Cli

parseShortcutArgs :: Cmd -> Parser (PackageName, Attrs) Source #

only used in shortcuts (niv add foo/bar ...) because PACKAGE is NOT optional

parseCmdArgs :: Cmd -> Parser (PackageName, Attrs) Source #

only used in command (niv add cmd ...) because PACKAGE is optional

doUpdate :: Attrs -> Cmd -> IO (Either SomeException Attrs) Source #

pretty much tryEvalUpdate but we might issue some warnings first

partitionEithersHMS :: (Eq k, Hashable k) => HashMap k (Either a b) -> (HashMap k a, HashMap k b) Source #

shouldUpdateNixSourcesNix :: ByteString -> Bool Source #

Checks if content is different than default and if it does not contain a comment line with niv: no_update