[project @ 1998-12-02 13:17:09 by simonm]
[ghc-hetmet.git] / ghc / compiler / DEPEND-NOTES
1 ToDo
2 ~~~~
3 * Test effect of eta-expanding past (case x of ..)
4
5 * Bottom strictness isn't right.  Should be (eg) SSX, not just X.
6
7 * Enumeration types in worker/wrapper for strictness analysis
8
9 * Use (!) types in data cons to unbox.
10
11 * Check constant folding
12
13 * .hi file isn't updated if the only change is to the exports.
14   For example, UgenAll.lhs re-exports all of U_binding.hs; when a data type
15   decl in the latter changes, the .hi file for the former isn't updated.
16   I think this happens when a module exports another mdodule thus:
17
18         module UgenAll( module U_binding, ... ) where
19
20 * This should be reported as an error:
21         data T k = MkT (k Int#)
22
23 * Bogus report of overlapped pattern for
24         f (R {field = [c]}) = 1
25         f (R {})              = 2
26   This shows up for TyCon.maybeTyConSingleCon
27
28 *  > module Main( main ) where
29
30    > f :: String -> Int
31    > f "=<" = 0
32    > f "="  = 0
33    
34    > g :: [Char] -> Int
35    > g ['=','<'] = 0
36    > g ['=']     = 0
37    
38    > main = return ()
39    
40    For ``f'' the following is reported.
41    
42    tmp.lhs:4: 
43     Pattern match(es) are overlapped in the definition of function `f'
44             "=" = ...
45
46    There are no complaints for definition for ``g''.
47
48 * Without -O I don't think we need change the module version
49   if the usages change; I forget why it changes even with -O
50
51 * Record selectors for existential type; no good!  What to do?
52   Record update doesn't make sense either.
53
54   Need to be careful when figuring out strictness, and when generating
55   worker-wrapper split.
56
57   Also when deriving.
58
59 * Consructor re-use via CSE
60
61                 Notes on module dependencies
62                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63
64 The Name/Var/Type group is a bit complicated. Here's the deal
65
66         Name, PrimRep, FieldLabel (uses Type.Type)
67 then
68         Var (uses Const.Con, IdInfo.IdInfo, Type.GenType, Type.Kind)
69 then
70         VarEnv, VarSet
71 then
72         Class (uses TyCon.TyCon, Type.Type, SpecEnv.SpecEnv)
73 then
74         TyCon (uses Type.Type, Type.Kind, DataCon.DataCon)
75 then
76         Type (uses [DataCon.DataCon])
77 then
78         DataCon, TysPrim, Unify, SpecEnv, PprType
79 then
80         IdInfo, TysWiredIn (uses DataCon.mkDataCon, [MkId.mkDataConId])
81 then
82         PrimOp (uses PprType, TysWiredIn)
83 then
84         Const (needs PrimOp, [TysWiredIn.stringTy])
85 then
86         Id (needs Const.Con(..)), CoreSyn
87 then
88         CoreUtils, OccurAnal
89 then
90         CoreUnfold (uses OccurAnal)
91 then
92         MkId (uses CoreUnfold)
93         
94
95 PrimOp uses TysWiredIn
96
97
98 Add
99 ~~~
100 basicTypes/DataCon.lhs
101 basicTypes/DataCon.hi-boot
102
103 Remove
104 ~~~~~~
105 specialise/SpecUtils.lhs
106 basicTypes/IdUtils.lhs