definition:
|
linkToLocalCache :: Config -> String -> String -> ErrorLogger ()
linkToLocalCache cfg src pkgDir = do
dirExists <- liftIOEL $ doesDirectoryExist src
if dirExists
then do
pkgSpec <- loadPackageSpec src
mbp <- getPackageVersion cfg (name pkgSpec) (version pkgSpec)
maybe (logCritical $
"Package '" ++ packageId pkgSpec ++ "' not in repository!\n" ++
"Note: you can only link copies of existing packages.")
(\_ -> do LocalCache.createLink pkgDir src
(packageId pkgSpec) True
return ())
mbp
else logCritical $ "Directory '" ++ src ++ "' does not exist."
|
demand:
|
no demanded arguments
|
deterministic:
|
deterministic operation
|
documentation:
|
--- Links a directory into the local package cache. Used for `cypm link`.
|
failfree:
|
<FAILING>
|
indeterministic:
|
referentially transparent operation
|
infix:
|
no fixity defined
|
iotype:
|
{(_,_,_) |-> _}
|
name:
|
linkToLocalCache
|
precedence:
|
no precedence defined
|
result-values:
|
_
|
signature:
|
CPM.Config.Config -> String -> String -> CPM.ErrorLogger.ErrorLogger ()
|
solution-complete:
|
operation might suspend on free variables
|
terminating:
|
possibly non-terminating
|
totally-defined:
|
possibly non-reducible on same data term
|