Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype NIO a = NIO {
- runNIO :: ReaderT FindSourcesJson IO a
- getFindSourcesJson :: NIO FindSourcesJson
- li :: MonadIO io => IO a -> io a
- cli :: IO ()
- parseCommand :: Parser (NIO ())
- parsePackageName :: Parser PackageName
- parsePackage :: Parser (PackageName, PackageSpec)
- data FetchNixpkgs
- data Nixpkgs = Nixpkgs Text Text
- parseCmdInit :: ParserInfo (NIO ())
- parseNixpkgs :: Parser FetchNixpkgs
- cmdInit :: FetchNixpkgs -> NIO ()
- initNixpkgs :: FetchNixpkgs -> NIO ()
- parseCmdAdd :: ParserInfo (NIO ())
- parseShortcutArgs :: Cmd -> Parser (PackageName, Attrs)
- parseCmdArgs :: Cmd -> Parser (PackageName, Attrs)
- cmdAdd :: Cmd -> PackageName -> Attrs -> NIO ()
- parseCmdShow :: ParserInfo (NIO ())
- cmdShow :: Maybe PackageName -> NIO ()
- showPackage :: MonadIO io => PackageName -> PackageSpec -> io ()
- parseCmdUpdate :: ParserInfo (NIO ())
- specToFreeAttrs :: PackageSpec -> Attrs
- specToLockedAttrs :: PackageSpec -> Attrs
- cmdUpdate :: Maybe (PackageName, PackageSpec) -> NIO ()
- doUpdate :: Attrs -> Cmd -> IO (Either SomeException Attrs)
- partitionEithersHMS :: (Eq k, Hashable k) => HashMap k (Either a b) -> (HashMap k a, HashMap k b)
- parseCmdModify :: ParserInfo (NIO ())
- cmdModify :: PackageName -> Maybe PackageName -> PackageSpec -> NIO ()
- parseCmdDrop :: ParserInfo (NIO ())
- cmdDrop :: PackageName -> [Text] -> NIO ()
- shouldUpdateNixSourcesNix :: ByteString -> Bool
- abortCannotAddPackageExists :: PackageName -> IO a
- abortCannotUpdateNoSuchPackage :: PackageName -> IO a
- abortCannotModifyNoSuchPackage :: PackageName -> IO a
- abortCannotDropNoSuchPackage :: PackageName -> IO a
- abortCannotShowNoSuchPackage :: PackageName -> IO a
- abortCannotAttributesDropNoSuchPackage :: PackageName -> IO a
- abortUpdateFailed :: [(PackageName, SomeException)] -> IO a
Documentation
NIO | |
|
Instances
Monad NIO Source # | |
Functor NIO Source # | |
Applicative NIO Source # | |
MonadIO NIO Source # | |
MonadUnliftIO NIO Source # | |
MonadReader FindSourcesJson NIO Source # | |
Defined in Niv.Cli ask :: NIO FindSourcesJson # local :: (FindSourcesJson -> FindSourcesJson) -> NIO a -> NIO a # reader :: (FindSourcesJson -> a) -> NIO a # |
parseCommand :: Parser (NIO ()) Source #
data FetchNixpkgs Source #
Whether or not to fetch nixpkgs
Instances
Show FetchNixpkgs Source # | |
Defined in Niv.Cli showsPrec :: Int -> FetchNixpkgs -> ShowS # show :: FetchNixpkgs -> String # showList :: [FetchNixpkgs] -> ShowS # |
parseCmdInit :: ParserInfo (NIO ()) Source #
cmdInit :: FetchNixpkgs -> NIO () Source #
initNixpkgs :: FetchNixpkgs -> NIO () Source #
parseCmdAdd :: ParserInfo (NIO ()) Source #
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
parseCmdShow :: ParserInfo (NIO ()) Source #
showPackage :: MonadIO io => PackageName -> PackageSpec -> io () Source #
parseCmdUpdate :: ParserInfo (NIO ()) Source #
specToFreeAttrs :: PackageSpec -> Attrs Source #
specToLockedAttrs :: PackageSpec -> Attrs Source #
cmdUpdate :: Maybe (PackageName, PackageSpec) -> NIO () Source #
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 #
parseCmdModify :: ParserInfo (NIO ()) Source #
cmdModify :: PackageName -> Maybe PackageName -> PackageSpec -> NIO () Source #
parseCmdDrop :: ParserInfo (NIO ()) 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
abortCannotAddPackageExists :: PackageName -> IO a Source #
abortCannotDropNoSuchPackage :: PackageName -> IO a Source #
abortCannotShowNoSuchPackage :: PackageName -> IO a Source #
abortUpdateFailed :: [(PackageName, SomeException)] -> IO a Source #