jbi-0.2.0.0: Just Build It - a "do what I mean" abstraction for Haskell build tools

Copyright(c) Ivan Lazar Miljenovic
LicenseMIT
MaintainerIvan.Miljenovic@gmail.com
Safe HaskellNone
LanguageHaskell2010

System.JBI.Commands.Tool

Description

 

Synopsis

Documentation

data Installed t Source #

Constructors

Installed 

Fields

Instances

Eq (Installed t) Source # 

Methods

(==) :: Installed t -> Installed t -> Bool #

(/=) :: Installed t -> Installed t -> Bool #

Ord (Installed t) Source # 
Read (Installed t) Source # 
Show (Installed t) Source # 
Generic (Installed t) Source # 

Associated Types

type Rep (Installed t) :: * -> * #

Methods

from :: Installed t -> Rep (Installed t) x #

to :: Rep (Installed t) x -> Installed t #

ToJSON (Installed t) Source # 
type Rep (Installed t) Source # 
type Rep (Installed t) = D1 * (MetaData "Installed" "System.JBI.Commands.Tool" "jbi-0.2.0.0-87Z4YlJt9pjCQ6SZOA4mPw" False) (C1 * (MetaCons "Installed" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "path") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Tagged * t CommandPath))) (S1 * (MetaSel (Just Symbol "version") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe (Tagged * t Version))))))

tryFindVersion :: Config -> FilePath -> IO (Maybe Version) Source #

Attempt to find the version of the provided command, by assuming it's contained in the first line of the output of command --version.

takeVersion :: String -> String Source #

If we're at the start of a Version, take all of it.

type Args = [String] Source #

tryRunOutput :: Config -> FilePath -> Args -> IO (Maybe String) Source #

Only return the stdout if the process was successful and had no stderr.

tryRunLine :: Config -> FilePath -> Args -> IO (Maybe String) Source #

As with tryRunOutput but only return the first line (if any).

tryRun :: Config -> Tagged t CommandPath -> Args -> IO ExitCode Source #

Returns success of call.

tryRunErr :: String -> IO ExitCode -> IO ExitCode Source #

Print the error message if it isn't successful.

(.&&.) :: Monad m => m ExitCode -> m ExitCode -> m ExitCode infixr 3 Source #

(.||.) :: Monad m => m ExitCode -> m ExitCode -> m ExitCode infixr 2 Source #

allM :: Monad m => (a -> m Bool) -> [a] -> m Bool Source #

Monad version of all, aborts the computation at the first False value