Changes between Version 12 and Version 13 of TypeFunctionsTypeChecking


Ignore:
Timestamp:
Aug 15, 2006 7:00:01 PM (8 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TypeFunctionsTypeChecking

    v12 v13  
    2323The function `TcTyClsDecls.tcTyClsDecls` produces `TypeRep.TyThing`s from type and class declarations.  The `TyThing`s produced from the new declaration forms are the following: 
    2424 `type family`:: 
    25    Type synonym families are represented by the standard `TyCon` variant for synonyms, namely `SynTyCon`.  They are distinguished from ordinary type synonyms by the value of the field `synTcRhs`, which is now of a new data type `SynTyConRhs`, which has a variant `OpenSynTyCon` to represent families. 
     25   Type synonym families are represented by the standard `TyCon` variant for synonyms, namely `SynTyCon`.  They are distinguished from ordinary type synonyms by the value of the field `synTcRhs`, which is now of a new data type `SynTyConRhs`, which has a variant `OpenSynTyCon resKind` to represent families. 
    2626 `data family` and `newtype family`:: 
    2727   Data and newtype families are represented by the `TyCon` variant `AlgTyCon`, as are their non-indexed counter parts, with the difference that the field `algTcRhs` has the newly introduced value `OpenAlgTyCon`.  
     
    3131To represent type families (which do not have a fixed right hand side), the type of `synTcRhs` changed from `Type` to `SynTyConRhs` with 
    3232{{{ 
    33 data SynTyConRhs = OpenSynTyCon | SynonymTyCon Type 
     33data SynTyConRhs = OpenSynTyCon Kind    -- *result* kind 
     34                 | SynonymTyCon Type    -- rhs of ordinary synonym 
    3435}}} 
    3536Consequently, all functions that dependent on this field need to be extended.  In particular, `TcType.isTauTyCon` regards applications of type family constructors as ''tau types''.  (SPJ, is that ok?  Probably not...)