aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2018-12-16 03:44:31 +0100
committerDaniel Gröber <dxld@darkboxed.org>2019-01-22 03:06:51 +0100
commita8c85a85f6527938b804a9d111fe10f237806f7e (patch)
tree1c67333b1d7b79b53a33e770990198b1c19e2f3f /src
parenta6059d493e2948bb033eb37beb2a962d1f5ec2f3 (diff)
Reintroduce type conventions: s/proj_type/pt/ s/cache/c/
Diffstat (limited to 'src')
-rw-r--r--src/CabalHelper/Compiletime/Types.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/CabalHelper/Compiletime/Types.hs b/src/CabalHelper/Compiletime/Types.hs
index 3c6ff73..5a19261 100644
--- a/src/CabalHelper/Compiletime/Types.hs
+++ b/src/CabalHelper/Compiletime/Types.hs
@@ -93,15 +93,15 @@ data DistDir (pt :: ProjType) where
-- | Environment for running a 'Query' value. The real constructor is
-- not exposed, use the 'mkQueryEnv' smart constructor instead. The field
-- accessors are exported and may be used to override the defaults, see below.
-type QueryEnv (proj_type :: ProjType)
- = QueryEnvI (QueryCache proj_type) proj_type
+type QueryEnv (pt :: ProjType)
+ = QueryEnvI QueryCache pt
-data QueryEnvI cache (proj_type :: ProjType) = QueryEnv
+data QueryEnvI c (pt :: ProjType) = QueryEnv
{ qeReadProcess
:: !(Maybe FilePath -> FilePath -> [String] -> String -> IO String)
-- ^ Field accessor for 'QueryEnv'. Function used to to start
-- processes. Useful if you need to, for example, redirect standard error
- -- output away from the user\'s terminal.
+ -- output of programs started by cabal-helper.
, qePrograms :: !Programs
-- ^ Field accessor for 'QueryEnv'.
@@ -109,17 +109,17 @@ data QueryEnvI cache (proj_type :: ProjType) = QueryEnv
, qeCompPrograms :: !CompPrograms
-- ^ Field accessor for 'QueryEnv'.
- , qeProjLoc :: !(ProjLoc proj_type)
+ , qeProjLoc :: !(ProjLoc pt)
-- ^ Field accessor for 'QueryEnv'. Defines path to the project directory,
-- i.e. a directory containing a @cabal.project@ file
- , qeDistDir :: !(DistDir proj_type)
+ , qeDistDir :: !(DistDir pt)
-- ^ Field accessor for 'QueryEnv'. Defines path to the @dist/@ or
-- @dist-newstyle/@ directory, aka. /builddir/ in Cabal terminology.
- , qeCacheRef :: !(IORef cache)
-- ^ Cache for query results, only accessible when type parameter @cache@ is
-- instantiated and not forall quantified.
+ , qeCacheRef :: !(IORef (c pt))
}
data QueryCache pt = QueryCache