#3725: Annotations not written to interface files
-----------------------+----------------------------------------------------
  Reporter:  rl        |          Owner:                  
      Type:  bug       |         Status:  new             
  Priority:  normal    |      Milestone:                  
 Component:  Compiler  |        Version:  6.13            
Resolution:            |       Keywords:                  
Difficulty:            |             Os:  Unknown/Multiple
  Testcase:            |   Architecture:  Unknown/Multiple
   Failure:  Other     |  
-----------------------+----------------------------------------------------
Changes (by simonpj):

  * difficulty:  =>

Comment:

 Roman,

 Quite right.  The relevant code is in `MkIface.lhs`.  Look at the
 declaration of `IfaceDeclExtras`:
 {{{
 data IfaceDeclExtras
   = IfaceIdExtras    Fixity [IfaceRule]
   | IfaceDataExtras  Fixity [IfaceInstABI] [(Fixity,[IfaceRule])]
   | IfaceClassExtras Fixity [IfaceInstABI] [(Fixity,[IfaceRule])]
   | IfaceSynExtras   Fixity
   | IfaceOtherDeclExtras
 }}}
 This collects information that forms part of an Id's fingerprint, even
 though the information is not serialised along with the Id itself; instead
 it occurs elsewhere in the interface file.  For example, fixity forms part
 of an Id's fingerprint, but appears in the `mi_fixities` field of the
 `ModIface`.

 What we'd forgotten is that the annotations for an Id should form part of
 its "extras". So the `IfaceIdExtras` constructor should look like
 {{{
   IfaceIdExtras Fixity [IfaceRule] [Serialized]
 }}}
 If you make that change, then I think the knock-on changes (notably
 filling in that field) will be obvious.

 Could you have a go at doing this?  Thanks

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3725#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to