CurryInfo: cpm-3.3.0 / CPM.Diff.Behavior.preparePackageDirs

definition:
preparePackageDirs :: Config
                   -> Repository
                   -> GC.GlobalCache
                   -> String
                   -> String
                   -> ErrorLogger ComparisonInfo
preparePackageDirs cfg repo gc dirA dirB = do
  baseTmp <- liftIOEL $ createBaseTemp
  specA <- loadPackageSpec dirA
  specB <- loadPackageSpec dirB
  let versionPrefixA = versionPrefix specA
  let versionPrefixB = versionPrefix specB
  let copyDirA       = baseTmp </> ("src_" ++ versionPrefixA)
  let copyDirB       = baseTmp </> ("src_" ++ versionPrefixB)
  let destDirA       = baseTmp </> ("dest_" ++ versionPrefixA)
  let destDirB       = baseTmp </> ("dest_" ++ versionPrefixB)
  logDebug ("Copying " ++ packageId specA ++
             " from " ++ dirA ++ " into " ++ copyDirA)
  logDebug ("and transforming it into " ++ destDirA)
  logDebug ("Copying " ++ packageId specB ++
             " from " ++ dirB ++ " into " ++ copyDirB)
  logDebug ("and transforming it into " ++ destDirB)
  modMapA <- copyAndPrefixPackage cfg repo gc dirA versionPrefixA
                                        copyDirA destDirA
  modMapB <- copyAndPrefixPackage cfg repo gc dirB versionPrefixB
                                        copyDirB destDirB
  return $ ComparisonInfo
    { infPackageA   = specA
    , infPackageB   = specB
    , infDirA       = destDirA
    , infDirB       = destDirB
    , infSourceDirA = copyDirA
    , infSourceDirB = copyDirB
    , infPrefixA    = versionPrefixA
    , infPrefixB    = versionPrefixB
    , infModMapA    = modMapA
    , infModMapB    = modMapB }
demand:
no demanded arguments
deterministic:
deterministic operation
documentation:
--- Prepares two packages from two directories for comparison. Copies the 
--- package files to a temporary directory and creates renamed version of the
--- packages and their dependencies.
---
--- @param cfg the CPM configuration
--- @param repo the package repository
--- @param gc the global package cache
--- @param dirA the directory containing the first package
--- @param dirB the directory containing the second package
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_,_,_,_) |-> _}
name:
preparePackageDirs
precedence:
no precedence defined
result-values:
_
signature:
CPM.Config.Config -> CPM.Repository.Repository
-> CPM.PackageCache.Global.GlobalCache -> String -> String
-> CPM.ErrorLogger.ErrorLogger ComparisonInfo
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term