Changes between Version 5 and Version 6 of CrossPackageDocumentation

Show
Ignore:
Timestamp:
05/23/09 17:33:11 (5 years ago)
Author:
waern (IP: 90.36.55.227)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CrossPackageDocumentation

    v5 v6  
    1919== Storing Declarations in .haddock Files == 
    2020 
    21 One way to get at the declarations, is to store them in the .haddock files. 
     21One way to get at the declarations, is to store them in the .haddock files. We would have to define Binary instances for all the `HsSyn` syntax types that we use. 
    2222 
    2323== Reconstructing Declarations from .hi Files ==  
     
    2525We might not need to store anything in the .haddock files if we can reconstruct all declarations from the `TyThings` available in the .hi files. We already convert instances using a conversion function `toHsType :: Type -> HsType Name`. We could try to write a conversation function `toHsDecl :: TyThing -> HsDecl Name`. 
    2626 
    27 It might also be possible to do the conversion using existing template haskell functionality from the GHC API. 
     27Apparently, it might also be possible to do the conversion using existing Template Haskell functionality. This needs looking into. 
    2828 
    29 The downside of this approach is that we loose the original declaration style. For example, we don't know if a data type was declared using GADT-style syntax (with a 'where' clause), or normal style. 
     29The downside of this approach is that we loose the original declaration style. For example, we don't know if a data type was declared using GADT-style syntax (with a 'where' clause), or normal style. Other examples: 
     30  * We can't put in extra parenthesis where the user wants them. 
     31  * Sometimes users want non-operators to be used infix, a good example is Conal's type composition `O`.