on master help sign in
Redo Stuff.metadata as Stuff.package / add file names for caching
6ea473dEvan Czaplicki
builder/src/Stuff.hs+17−5
@@ -1,6 +1,8 @@
1{-# OPTIONS_GHC -Wall #-}
1{-# OPTIONS_GHC -Wall #-}
2module Stuff
2module Stuff
3 ( details
3 ( details
4+ , interfaces
5+ , objects
4 , prepublishDir
6 , prepublishDir
5 , elmi
7 , elmi
6 , elmo
8 , elmo
@@ -9,7 +11,7 @@ module Stuff
9 , PackageCache
11 , PackageCache
10 , getPackageCache
12 , getPackageCache
11 , registry
13 , registry
12− , metadata
14+ , package
13 , getReplCache
15 , getReplCache
14 )
16 )
15 where
17 where
@@ -36,7 +38,17 @@ stuff =
36
38
37details :: FilePath
39details :: FilePath
38details =
40details =
39− stuff </> "details.dat"
41+ stuff </> "d.dat"
42+
43+
44+interfaces :: FilePath
45+interfaces =
46+ stuff </> "i.dat"
47+
48+
49+objects :: FilePath
50+objects =
51+ stuff </> "o.dat"
40
52
41
53
42prepublishDir :: FilePath
54prepublishDir :: FilePath
@@ -117,9 +129,9 @@ registry (PackageCache dir) =
117 dir </> "registry.dat"
129 dir </> "registry.dat"
118
130
119
131
120−metadata :: PackageCache -> Pkg.Name -> V.Version -> String -> FilePath
132+package :: PackageCache -> Pkg.Name -> V.Version -> FilePath
121−metadata (PackageCache dir) name version path =
133+package (PackageCache dir) name version =
122− dir </> Pkg.toFilePath name </> V.toChars version </> path
134+ dir </> Pkg.toFilePath name </> V.toChars version
123
135
124
136
125
137