@@ -17,8 +17,6 @@ import Development.IDE.Functions.Compile (TcModuleResult,
17import qualified Development.IDE.Functions.Compile as Compile
17import qualified Development.IDE.Functions.Compile as Compile
18import Development.IDE.Functions.FindImports (Import(..))
18import Development.IDE.Functions.FindImports (Import(..))
19import Development.IDE.Functions.DependencyInformation
19import Development.IDE.Functions.DependencyInformation
20−import Data.Binary (Binary)
21−import qualified Data.Binary as Binary
22import Data.Hashable
20import Data.Hashable
23import Data.Typeable
21import Data.Typeable
24import Development.Shake hiding (Env, newCache)
22import Development.Shake hiding (Env, newCache)
@@ -63,7 +61,7 @@ type instance RuleResult GenerateCore = GhcModule
64-- | We capture the subset of `DynFlags` that is computed by package initialization in a rule to
62-- | We capture the subset of `DynFlags` that is computed by package initialization in a rule to
65-- make session initialization cheaper by reusing it.
63-- make session initialization cheaper by reusing it.
66−type instance RuleResult GeneratePackageState = Compile.PackageState
64+type instance RuleResult LoadPackageState = Compile.PackageState
68-- | Resolve the imports in a module to the list of either external packages or absolute file paths
66-- | Resolve the imports in a module to the list of either external packages or absolute file paths
69-- for modules in the same package.
67-- for modules in the same package.
@@ -77,69 +75,58 @@ type instance RuleResult ReportImportCycles = ()
78data OfInterest = OfInterest
76data OfInterest = OfInterest
79 deriving (Eq, Show, Typeable, Generic)
77 deriving (Eq, Show, Typeable, Generic)
80−instance Binary OfInterest
81instance Hashable OfInterest
78instance Hashable OfInterest
82instance NFData OfInterest
79instance NFData OfInterest
84data GetParsedModule = GetParsedModule
81data GetParsedModule = GetParsedModule
85 deriving (Eq, Show, Typeable, Generic)
82 deriving (Eq, Show, Typeable, Generic)
86−instance Binary GetParsedModule
87instance Hashable GetParsedModule
83instance Hashable GetParsedModule
88instance NFData GetParsedModule
84instance NFData GetParsedModule
90data GetLocatedImports = GetLocatedImports
86data GetLocatedImports = GetLocatedImports
91 deriving (Eq, Show, Typeable, Generic)
87 deriving (Eq, Show, Typeable, Generic)
92−instance Binary GetLocatedImports
93instance Hashable GetLocatedImports
88instance Hashable GetLocatedImports
94instance NFData GetLocatedImports
89instance NFData GetLocatedImports
96data GetDependencyInformation = GetDependencyInformation
91data GetDependencyInformation = GetDependencyInformation
97 deriving (Eq, Show, Typeable, Generic)
92 deriving (Eq, Show, Typeable, Generic)
98−instance Binary GetDependencyInformation
99instance Hashable GetDependencyInformation
93instance Hashable GetDependencyInformation
100instance NFData GetDependencyInformation
94instance NFData GetDependencyInformation
102data ReportImportCycles = ReportImportCycles
96data ReportImportCycles = ReportImportCycles
103 deriving (Eq, Show, Typeable, Generic)
97 deriving (Eq, Show, Typeable, Generic)
104−instance Binary ReportImportCycles
105instance Hashable ReportImportCycles
98instance Hashable ReportImportCycles
106instance NFData ReportImportCycles
99instance NFData ReportImportCycles
108data GetDependencies = GetDependencies
101data GetDependencies = GetDependencies
109 deriving (Eq, Show, Typeable, Generic)
102 deriving (Eq, Show, Typeable, Generic)
110−instance Binary GetDependencies
111instance Hashable GetDependencies
103instance Hashable GetDependencies
112instance NFData GetDependencies
104instance NFData GetDependencies
114data TypeCheck = TypeCheck
106data TypeCheck = TypeCheck
115 deriving (Eq, Show, Typeable, Generic)
107 deriving (Eq, Show, Typeable, Generic)
116−instance Binary TypeCheck
117instance Hashable TypeCheck
108instance Hashable TypeCheck
118instance NFData TypeCheck
109instance NFData TypeCheck
120data LoadPackage = LoadPackage InstalledUnitId
111data LoadPackage = LoadPackage InstalledUnitId
121 deriving (Eq, Show, Typeable, Generic)
112 deriving (Eq, Show, Typeable, Generic)
122−instance Binary LoadPackage
123instance Hashable LoadPackage
113instance Hashable LoadPackage
124instance NFData LoadPackage
114instance NFData LoadPackage
126data GetSpanInfo = GetSpanInfo
116data GetSpanInfo = GetSpanInfo
127 deriving (Eq, Show, Typeable, Generic)
117 deriving (Eq, Show, Typeable, Generic)
128−instance Binary GetSpanInfo
129instance Hashable GetSpanInfo
118instance Hashable GetSpanInfo
130instance NFData GetSpanInfo
119instance NFData GetSpanInfo
132data GenerateCore = GenerateCore
121data GenerateCore = GenerateCore
133 deriving (Eq, Show, Typeable, Generic)
122 deriving (Eq, Show, Typeable, Generic)
134−instance Binary GenerateCore
135instance Hashable GenerateCore
123instance Hashable GenerateCore
136instance NFData GenerateCore
124instance NFData GenerateCore
138−data GeneratePackageState = GeneratePackageState [FilePath] Bool [(String, [(String, String)])]
126+data LoadPackageState = LoadPackageState
139 deriving (Eq, Show, Typeable, Generic)
127 deriving (Eq, Show, Typeable, Generic)
140−instance Binary GeneratePackageState
128+instance Hashable LoadPackageState
141−instance Hashable GeneratePackageState
142−instance NFData GeneratePackageState
129+instance NFData LoadPackageState
144------------------------------------------------------------
131------------------------------------------------------------
145-- Orphan Instances
132-- Orphan Instances
@@ -171,10 +158,6 @@ instance NFData SpanInfo where
171instance NFData Import where
158instance NFData Import where
172 rnf = rwhnf
159 rnf = rwhnf
174−instance Binary InstalledUnitId where
175− get = fmap stringToInstalledUnitId Binary.get
176− put = Binary.put . installedUnitIdString
178instance Hashable InstalledUnitId where
161instance Hashable InstalledUnitId where
179 hashWithSalt salt = hashWithSalt salt . installedUnitIdString
162 hashWithSalt salt = hashWithSalt salt . installedUnitIdString