Changes between Version 99 and Version 100 of TypeFunctionsStatus

Oct 18, 2006 10:03:29 PM (11 years ago)



  • TypeFunctionsStatus

    v99 v100  
    6  * Overlap check for data/newtype instances.
    7    2. In `M.hi` store the names of all modules below (and including `M`) that contain family instances.  Invariant: if `M` compiles, then none of those modlues have overlaps.
    8    3. When compiling a new module `K`, union the sets from direct imports, plus `K` itself if it has family instances.  If that union is a subset of any of the incoming ones, nothing to do!  Otherwise, further checking needed.
    9    4. Further checking can be brute-force or intelligently to minimise the number of checks.  ''Brute-force:'' Take the `FamInst`s of all family-instance modules that are in the complement of the intersection of the sets of family-instance modules contained in each imported module and add `K` if it has imports.  Check this whole set using the check from Point (1).  ''Intelligently:'' Compute the set of all module pairs that have already been checked for overlap (as they both occur in the family-instance module list of any import) and subtract that from the set of all pairs of visible family-instance modules.  These are the critical module pairs.  Check any pair of instances coming from two different modules in a critical module pair.
    106 * Where should the family instance consistency check go for GHCi?  `tcGetModuleExports`?  (Where is that function called?)
    117 * There really is no reason anymore to disallow family instances where all arguments are type variables.  Such instances are rarely useful, but may be when creating stub files or so; so why disallow them.  Check that they are working.
    3430Todo (low-level):
    35  * data/newtype instances may not overlap.  (Such definitions would always be non-confluent.)  We might be able to get away with a lazy check at every place where a value of family type is constructed (i.e., occurences of the datacon wrapper).  Such a value may never be an inhabitant of more than one instance declaration.  No, we won't get away with this...
    3631 * RHS of a `type instance` must be a tau type.
    3732 * Check that patterns of type indexes don't contain type functions.
    5045 * Kind and type checking of instance declarations of indexed types.
    5146 * Wrapper generation and type checking of pattern matching for indexed data and newtypes.
     47 * Consistency checking for family instances.
    5349== Desugaring ==