Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- listbinCommand :: CommandUI (NixStyleFlags ())
- listbinAction :: NixStyleFlags () -> [String] -> GlobalFlags -> IO ()
- selectPackageTargets :: TargetSelector -> [AvailableTarget k] -> Either ListBinTargetProblem [k]
- selectComponentTarget :: SubComponentTarget -> AvailableTarget k -> Either ListBinTargetProblem k
- noComponentsProblem :: TargetSelector -> ListBinTargetProblem
- matchesMultipleProblem :: TargetSelector -> [AvailableTarget ()] -> ListBinTargetProblem
- multipleTargetsProblem :: TargetsMap -> TargetProblem ListBinProblem
- componentNotRightKindProblem :: PackageId -> ComponentName -> TargetProblem ListBinProblem
Documentation
listbinCommand :: CommandUI (NixStyleFlags ()) Source #
listbinAction :: NixStyleFlags () -> [String] -> GlobalFlags -> IO () Source #
Internals exposed for testing
selectPackageTargets :: TargetSelector -> [AvailableTarget k] -> Either ListBinTargetProblem [k] Source #
This defines what a TargetSelector
means for the list-bin
command.
It selects the AvailableTarget
s that the TargetSelector
refers to,
or otherwise classifies the problem.
For the list-bin
command we select the exe or flib if there is only one
and it's buildable. Fail if there are no or multiple buildable exe components.
selectComponentTarget :: SubComponentTarget -> AvailableTarget k -> Either ListBinTargetProblem k Source #
For a TargetComponent
TargetSelector
, check if the component can be
selected.
For the run
command we just need to check it is a executable-like
(an executable, a test, or a benchmark), in addition
to the basic checks on being buildable etc.
noComponentsProblem :: TargetSelector -> ListBinTargetProblem Source #
matchesMultipleProblem :: TargetSelector -> [AvailableTarget ()] -> ListBinTargetProblem Source #
multipleTargetsProblem :: TargetsMap -> TargetProblem ListBinProblem Source #
componentNotRightKindProblem :: PackageId -> ComponentName -> TargetProblem ListBinProblem Source #