blob: 081b0480004d1007f2767dd48b971b6126e6ffb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
\begin{code}
module DsMonad (DsM) where
import TcRnTypes
data DsGblEnv
data DsLclEnv
type DsM result = TcRnIf DsGblEnv DsLclEnv result
\end{code}
Some notes about this boot file (from Edsko):
DsMonad has a (transitive) dependency on Hooks in at least two ways:
once through Finder, which imports Packages, which imports Hooks; but
that's easily solved, because Finder can import PackageState
instead. However, it is less obvious to me how to resolve the
following import cycle
- DsMonad imports tcIfaceGlobal from TcIface
- TcIface imports (loadWiredInHomeIface, loadInterface, loadDecls,
findAndReadIface) from LoadIface
- LoadIFace imports Hooks
(There might be still others, this is the most direct one at the moment.)
(Just to be clear, Hooks imports DsMonad because it needs the DsM type
for the dsForeignsHook.)
I'm sure this cycle can be broken somehow, but I'm not familiar enough
with this part of the compiler to see if there is a natural point to
do it.
|