[GHC] #8011: -ddump-minimal-imports creates incorrect imports for associated types

GHC ghc-devs at haskell.org
Tue Jun 25 13:01:58 CEST 2013


#8011: -ddump-minimal-imports creates incorrect imports for associated types
-------------------------------------------+--------------------------------
  Reporter:  dsf                           |          Owner:                  
      Type:  bug                           |         Status:  closed          
  Priority:  normal                        |      Milestone:                  
 Component:  Compiler                      |        Version:  7.6.3           
Resolution:  fixed                         |       Keywords:                  
        Os:  Unknown/Multiple              |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown                  |     Difficulty:  Unknown         
  Testcase:  indexed_types/should_compile  |      Blockedby:                  
  Blocking:                                |        Related:                  
-------------------------------------------+--------------------------------
Changes (by simonpj):

  * status:  new => closed
  * difficulty:  => Unknown
  * resolution:  => fixed
  * testcase:  => indexed_types/should_compile


Comment:

 Actually I found that a further change was needed to allow
 {{{
 module URL ( ToURL(toURL, nullURL, errorURL, URLT) ) where ...
 }}}
 Notice the associated type `URLT` can be a sub-component of the
 `ToURL(...)` list.

 The patch is this:
 {{{
 commit 0cb60cee510ac65b06d9c5b1b3ea8bc9984f6f33
 Author: Simon Peyton Jones <simonpj at microsoft.com>
 Date:   Tue Jun 25 09:30:27 2013 +0100

     Further fixes in RnNames, to make associated type exports work

     You ought to be able to say

       module M( C( T, foo ) where
         class C a where
           type T a
           foo :: a -> T a

     i.e. with T in C's sub-item list.  This makes it so.

 >---------------------------------------------------------------

  compiler/rename/RnNames.lhs | 66
 +++++++++++++++++++--------------------------
  1 file changed, 27 insertions(+), 39 deletions(-)
 }}}
 Regression test tests both.

 Simon

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



More information about the ghc-tickets mailing list