#7867: Allow template-haskell to communicate with itself between compilation 
units
through the interface file
---------------------------------+------------------------------------------
    Reporter:  errge             |       Owner:                  
        Type:  feature request   |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Template Haskell  |     Version:  7.6.3           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by errge):

 Hi Simon,

 Thanks for your reply.

 I actually found annotations before reporting this issue and my plan was
 to look into them and if they are persisted in interface files then add
 some access for them from Template Haskell reify (currently that's not
 there), but this is what I found:

 {{{
 errge@curry:/tmp $ cat Foo.hs
 module Foo (foo) where

 {-# ANN foo "my message" #-}
 foo x = x
 errge@curry:/tmp $ ghc -c -o Foo.o Foo.hs
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 errge@curry:/tmp $ cp Foo.hi Foo.hi.old
 // Edit file to have "my message newer"
 errge@curry:/tmp $ cat Foo.hs
 module Foo (foo) where

 {-# ANN foo "my message newer" #-}
 foo x = x
 errge@curry:/tmp $ ghc -c -o Foo.o Foo.hs
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 errge@curry:/tmp $ cmp Foo.hi.old Foo.hi
 errge@curry:/tmp $ echo $?
 0
 errge@curry:/tmp $ ghc --version
 The Glorious Glasgow Haskell Compilation System, version 7.6.2
 }}}

 So my annotation is definitely not persisted in the Foo.hi file with
 7.6.2.  Am I doing something wrong?  Is this different with GHC HEAD?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7867#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

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

Reply via email to