Tue Mar 31 14:23:06 PDT 2009  David Waern <[email protected]>
  * Allow Haddock comments in type synonyms
  Ignore-this: 11f1bad22d25d8d0017580d020c1aa5d
  
  We now use `ctypedoc` instead of `ctype` for type synonyms. `ctypedoc` was
  previously only used for top-level type signatures. This change means that 
type
  synonyms now can contain comments, just like top-level type signatures.
    
  Note:
    
  * I've modified `ctypedoc` so it allows implicit parameters and equational
  constraints, just like ctype.
    
  * Since `ctypedoc` allows nested foralls, we now allow that in type synonyms.
    
  * I have inlined some productions into gentypedoc so that there is now a
  non-doc version of every production with a 'doc' suffix. (Stylistic change
  only, which should make the code easier to follow).
    
  * It would have been nice to simplify the grammar by unifying `ctype` and 
  ctypedoc` into one production, allowing comments on types everywhere (and
  rejecting them after parsing, where necessary).  This is however not possible
  since it leads to ambiguity. The reason is the support for comments on record
  fields:
    
  > data R = R { field :: Int -- ^ comment on the field }
    
  If we allow comments on types here, it's not clear if the comment applies
  to 'field' or to 'Int'. So we must use `ctype` to describe the type.

    M ./compiler/parser/Parser.y.pp -22 +22

View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20090331212306-a762e-08e1a5550f0b04374b9104cb133ed5cbb39f8c2c.gz

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to