Changes between Version 19 and Version 20 of IntermediateTypes


Ignore:
Timestamp:
Aug 4, 2006 3:59:45 PM (9 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IntermediateTypes

    v19 v20  
    33These notes describe the new intermediate language for GHC.  The 
    44intermediate language is based on System F with algebraic datatypes 
    5 and explicit type coercions (hereafter FC).  This note mostly focuses 
     5and explicit type coercions (hereafter FC) (see the [http:// paper]).  This note mostly focuses 
    66on the type system and also discuss how some source-level features are 
    77represented in the intermediate language. 
     
    197197functions like `tcSplitForAllTy` and `tcSplitPhiTy` and `tcSplitSigmaTy`, 
    198198treat `ForAllTy cv ty` as if it were `FunTy (PredTy (EqPred T1 T2)) ty` 
    199 (where `PredTy (EqPred T1 T2)` is the kind of `cv`).  Also, several of the dataConXXX functions treat equality 
     199(where `PredTy (EqPred T1 T2)` is the kind of `cv`).  Also, several of the `dataCon`XXX functions treat coercion members of the data constructor 
     200as if they were dictionary predicates (i.e. they return the `PredTy (EqPred T1 T2)` with the theta). 
    200201 
    201202=== Newtypes are coerced types === 
     
    216217Such coercions are always used when the newtype is recursive and are optional for non-recursive newtypes.  This can be easily changed by altering the function mkNewTyConRhs in iface/BuildTyCl.lhs. 
    217218 
    218  
    219219== Core (the intermediate language) == 
    220220