[GHC] #8426: one-shot compilation + TH doesn't see instances that is seen in batch mode

GHC ghc-devs
Thu Oct 10 17:31:11 UTC 2013


#8426: one-shot compilation + TH doesn't see instances that is seen in batch mode
----------------------------+----------------------------------------------
        Reporter:  errge    |            Owner:
            Type:  bug      |           Status:  new
        Priority:  normal   |        Milestone:
       Component:           |          Version:  7.7
  Template Haskell          |         Keywords:
      Resolution:           |     Architecture:  Unknown/Multiple
Operating System:           |       Difficulty:  Moderate (less than a day)
  Unknown/Multiple          |       Blocked By:
 Type of failure:  Other    |  Related Tickets:  #7867
       Test Case:           |
        Blocking:           |
----------------------------+----------------------------------------------

Comment (by simonpj):

 That seems plausible.  But reading the transitive closure of all interface
 files could be thousands of files!  And 90% of the time when reifying a
 family or class you don't actually want an exhaustive list of all possible
 instances in all possible modules.

 A possible alternative is this: remove `[InstanceDec]` from `ClassI` and
 `FamilyI`.  Instead you have to use `qReifyInstances` to find out about
 instances.  Because the latter has a `[Type]` you can use that to know
 which interface files to load.

 To me that sounds simpler (delete code rather than add it), without really
 removing useful functionality.

 Simon

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



More information about the ghc-tickets mailing list