CurryInfo: cpm-3.3.0 / CPM.Package.loadPackageSpec

definition:
loadPackageSpec :: String -> ErrorLogger Package
loadPackageSpec dir = do
  let packageFile = dir </> packageSpecFile
  exfile <- liftIOEL $ doesFileExist packageFile
  if exfile
    then do logDebug $ "Reading package specification '" ++ packageFile ++ "'..."
            contents <- liftIOEL $ readCompleteFile packageFile
            case readPackageSpec contents of
               Left err -> fail err
               Right v  -> return v
    else fail $ "Illegal package: file `" ++ packageFile ++ "' does not exist!"
demand:
no demanded arguments
deterministic:
deterministic operation
documentation:
--- Loads a package specification from a package directory.
---
--- @param the directory containing the `package.json` file
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_) |-> _}
name:
loadPackageSpec
precedence:
no precedence defined
result-values:
_
signature:
String -> CPM.ErrorLogger.ErrorLogger Package
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term