-ToDo
-~~~~
-* Test effect of eta-expanding past (case x of ..)
-
-* Bottom strictness isn't right. Should be (eg) SSX, not just X.
-
-* Enumeration types in worker/wrapper for strictness analysis
-
-* Use (!) types in data cons to unbox.
-
-* Check constant folding
-
-* .hi file isn't updated if the only change is to the exports.
- For example, UgenAll.lhs re-exports all of U_binding.hs; when a data type
- decl in the latter changes, the .hi file for the former isn't updated.
- I think this happens when a module exports another mdodule thus:
-
- module UgenAll( module U_binding, ... ) where
-
-* This should be reported as an error:
- data T k = MkT (k Int#)
-
-* Bogus report of overlapped pattern for
- f (R {field = [c]}) = 1
- f (R {}) = 2
- This shows up for TyCon.maybeTyConSingleCon
-
-* > module Main( main ) where
-
- > f :: String -> Int
- > f "=<" = 0
- > f "=" = 0
-
- > g :: [Char] -> Int
- > g ['=','<'] = 0
- > g ['='] = 0
-
- > main = return ()
-
- For ``f'' the following is reported.
-
- tmp.lhs:4:
- Pattern match(es) are overlapped in the definition of function `f'
- "=" = ...
-
- There are no complaints for definition for ``g''.
-
-* Without -O I don't think we need change the module version
- if the usages change; I forget why it changes even with -O
-
-* Record selectors for existential type; no good! What to do?
- Record update doesn't make sense either.
-
- Need to be careful when figuring out strictness, and when generating
- worker-wrapper split.
-
- Also when deriving.
-
-* Consructor re-use via CSE
-
Notes on module dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Name/Var/Type group is a bit complicated. Here's the deal
+Things in brackets are what the module *uses*.
+A 'loop' indicates a use from a module compiled later
- Name, PrimRep, FieldLabel (uses Type.Type)
+ Name, PrimRep, FieldLabel (loop Type.Type)
then
- Var (uses Const.Con, IdInfo.IdInfo, Type.GenType, Type.Kind)
+ PrelNames
then
- VarEnv, VarSet
+ Var (Name, loop CoreSyn.CoreExpr, loop IdInfo.IdInfo,
+ loop Type.GenType, loop Type.Kind)
then
- Class (uses TyCon.TyCon, Type.Type, SpecEnv.SpecEnv)
+ VarEnv, VarSet, ThinAir
then
- TyCon (uses Type.Type, Type.Kind, DataCon.DataCon)
+ Class (loop TyCon.TyCon, loop Type.Type)
then
- Type (uses [DataCon.DataCon])
+ TyCon (loop Type.Type, loop Type.Kind, loop DataCon.DataCon, loop Generics.GenInfo)
then
- DataCon, TysPrim, Unify, SpecEnv, PprType
+ Type (loop DataCon.DataCon, loop Subst.substTy)
then
- IdInfo, TysWiredIn (uses DataCon.mkDataCon, [MkId.mkDataConId])
+ TysPrim (Type), PprEnv (loop DataCon.DataCon, Type)
then
- PrimOp (uses PprType, TysWiredIn)
+ Unify, PprType (PprEnv)
then
- Const (needs PrimOp, [TysWiredIn.stringTy])
+ Literal (TysPrim, PprType), DataCon
then
- Id (needs Const.Con(..)), CoreSyn
+ TysWiredIn (DataCon.mkDataCon, loop MkId.mkDataConId, loop Generics.mkGenInfo)
then
- CoreUtils, OccurAnal
+ PrimOp (PprType, TysWiredIn)
then
- CoreUnfold (uses OccurAnal)
+ CoreSyn
then
- MkId (uses CoreUnfold)
-
-
-PrimOp uses TysWiredIn
-
-
-Add
-~~~
-basicTypes/DataCon.lhs
-basicTypes/DataCon.hi-boot
+ IdInfo (CoreSyn.Unfolding, CoreSyn.CoreRules)
+then
+ Id (lots from IdInfo)
+then
+ CoreFVs, PprCore
+then
+ CoreUtils (PprCore.pprCoreExpr, CoreFVs.exprFreeVars,
+ CoreSyn.isEvaldUnfolding CoreSyn.maybeUnfoldingTemplate)
+then
+ OccurAnal (CoreUtils.exprIsTrivial)
+then
+ CoreUnfold (OccurAnal.occurAnalyseGlobalExpr)
+then
+ Rules (Unfolding), Subst (Unfolding, CoreFVs), CoreTidy (noUnfolding), Generics (mkTopUnfolding)
+then
+ MkId (CoreUnfold.mkUnfolding, Subst)
+then
+ PrelInfo (MkId)
-Remove
-~~~~~~
-specialise/SpecUtils.lhs
-basicTypes/IdUtils.lhs