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

GHC ghc-devs at haskell.org
Mon Oct 14 12:41:32 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 errge):

 Over the weekend I implemented option 1.

 So, what the patch currently does is the following:
   - as Simon suggested, get rid of instance reification when reifying a
 class or type family, because they can't be made unambiguous,
   - add a new Q monad statement to get the instances from all of our
 dependencies: this may be slow, but never called explicitly, so doesn't
 add accidental slowness,
   - the patch is careful that even if you call the slow transitive
 instance search, we don't pollute the EPS map, so future EPS lookups won't
 get slower because of bigger map size.

 I also attached the necessary one liner change in dph and the testsuite
 updates.  Ran full validate (not just fast), the attached testsuite patch
 fixes everything what this change causes.

 On top of this it's easy to implement the controversial "module listing"
 functionality from #8398 cleanly.  We just load transitively in every
 interface file and then return all of our dependencies.  That's well
 defined and not compiler implementation dependent.

 Please review.  Thanks.

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


More information about the ghc-tickets mailing list