Commit 728fdcf7 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Extend HcPkgInfo for mulit-package instances capabilities

Part 1: just add the fields and fill them in for each HcPkg user.
parent b54f36a7
......@@ -1121,6 +1121,8 @@ hcPkgInfo conf = HcPkg.HcPkgInfo { HcPkg.hcPkgProgram = ghcPkgProg
, HcPkg.flagPackageConf = v < [7,5]
, HcPkg.supportsDirDbs = v >= [6,8]
, HcPkg.requiresDirDbs = v >= [7,10]
, HcPkg.nativeMultiInstance = v >= [7,10]
, HcPkg.recacheMultiInstance = v >= [6,12]
}
where
v = versionBranch ver
......
......@@ -871,6 +871,8 @@ hcPkgInfo conf = HcPkg.HcPkgInfo { HcPkg.hcPkgProgram = ghcjsPkgProg
, HcPkg.flagPackageConf = False
, HcPkg.supportsDirDbs = True
, HcPkg.requiresDirDbs = v >= [7,10]
, HcPkg.nativeMultiInstance = v >= [7,10]
, HcPkg.recacheMultiInstance = True
}
where
v = versionBranch ver
......
......@@ -789,6 +789,8 @@ hcPkgInfo conf = HcPkg.HcPkgInfo { HcPkg.hcPkgProgram = lhcPkgProg
, HcPkg.flagPackageConf = False
, HcPkg.supportsDirDbs = True
, HcPkg.requiresDirDbs = True
, HcPkg.nativeMultiInstance = False -- ?
, HcPkg.recacheMultiInstance = False -- ?
}
where
Just lhcPkgProg = lookupProgram lhcPkgProgram conf
......@@ -77,6 +77,8 @@ data HcPkgInfo = HcPkgInfo
, flagPackageConf :: Bool -- ^ use package-conf option instead of package-db
, supportsDirDbs :: Bool -- ^ supports directory style package databases
, requiresDirDbs :: Bool -- ^ requires directory style package databases
, nativeMultiInstance :: Bool -- ^ supports --enable-multi-instance flag
, recacheMultiInstance :: Bool -- ^ supports multi-instance via recache
}
-- | Call @hc-pkg@ to initialise a package database at the location {path}.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment