mirror of
https://github.com/aelve/guide.git
synced 2024-11-22 11:33:34 +03:00
Moved the persistent part of hackage to subdirectory persist
This commit is contained in:
parent
7d09f1dfe3
commit
3dba152d43
1
.gitignore
vendored
1
.gitignore
vendored
@ -18,6 +18,7 @@ cabal-dev
|
||||
cabal.sandbox.config
|
||||
cabal.config
|
||||
stackagefiles
|
||||
hackagefiles
|
||||
TAGS
|
||||
.DS_Store
|
||||
*~
|
||||
|
@ -9,6 +9,7 @@ module Common(URL,
|
||||
getArchive,
|
||||
getArchiveClone,
|
||||
getTar,
|
||||
getArchivePersistDir,
|
||||
getTarClone,
|
||||
parseIntEnd,
|
||||
parseValEnd,
|
||||
@ -95,6 +96,9 @@ tar = "01-index.tar"
|
||||
tarClone :: FilePath
|
||||
tarClone = "01-index.orig.tar"
|
||||
|
||||
getArchivePersistDir :: HackageUpdateInfo -> FilePath
|
||||
getArchivePersistDir iuh = iuhUpdateDir iuh </> "persist"
|
||||
|
||||
getArchive :: HackageUpdateInfo -> FilePath
|
||||
getArchive iuh = iuhUpdateDir iuh </> archive
|
||||
|
||||
|
@ -72,7 +72,7 @@ buildCommand ui = processCommand
|
||||
| chk "ltsshowcont" = let lts = parseValEnd command in
|
||||
SC.showLTSContents (getLTSFile (sui ui) lts)
|
||||
|
||||
|
||||
|
||||
-- | chk "ltspersist" =
|
||||
-- SC.updateLT
|
||||
|
||||
@ -111,7 +111,7 @@ buildCommand ui = processCommand
|
||||
snapURL = (iuhSnapshotURL.iuh) ui
|
||||
trFile = (getTar.iuh) ui
|
||||
trFileC = (getTarClone.iuh) ui
|
||||
ud = (iuhUpdateDir.iuh) ui
|
||||
ud = (getArchivePersistDir.iuh) ui
|
||||
|
||||
snapshotsURL = (getSnapshotURL.sui) ui
|
||||
|
||||
|
@ -9,9 +9,8 @@ import qualified Data.Map.Strict as M
|
||||
import qualified Data.Version as DV
|
||||
|
||||
import Common
|
||||
|
||||
{-
|
||||
type StackageName = String
|
||||
|
||||
type StackageVersionLTS = M.Map LongSnapshotName DV.Version
|
||||
|
||||
data StackagePackage = SP {
|
||||
@ -20,3 +19,4 @@ data StackagePackage = SP {
|
||||
} deriving (Eq, Show)
|
||||
|
||||
type StackageMap = M.Map StackageName StackagePackage
|
||||
-}
|
@ -68,6 +68,8 @@ parseYamlFileThrow body = case Y.decode body of
|
||||
(Just datum) -> return datum
|
||||
Nothing -> X.throwIO $ UAE "Could not decode package data yaml"
|
||||
|
||||
|
||||
|
||||
-- This is the data, that is extracted from the yaml file
|
||||
instance FromJSON PackageDatum where
|
||||
parseJSON = withObject "bigfatyaml" $ \o -> do
|
||||
|
Loading…
Reference in New Issue
Block a user