[GHC] #3197: disambiguating type family instances with qualified names not possible

GHC trac at galois.com
Wed Apr 29 11:57:42 EDT 2009


#3197: disambiguating type family instances with qualified names not possible
----------------------------------------+-----------------------------------
    Reporter:  claus                    |        Owner:                  
        Type:  bug                      |       Status:  new             
    Priority:  normal                   |    Milestone:                  
   Component:  Compiler (Type checker)  |      Version:  6.11            
    Severity:  normal                   |   Resolution:                  
    Keywords:                           |   Difficulty:  Unknown         
    Testcase:                           |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple         |  
----------------------------------------+-----------------------------------
Comment (by claus):

 >Ordinary Haskell 98 type synonyms are, in effect, a type family with zero
 indices.

 Until this example, I thought so, too. But there is still a difference:
 type synonyms have to be instantiated (given a right-hand side)
 immediately, type families can be instantiated later.

 In the initial example above, `type family Label a` is defined in `LA`,
 but instantiated in `LC` (which imports `LA`) - that is how it comes close
 to parameterizing module `LA` by type `Label a` (see also
 [http://www.haskell.org/pipermail/haskell-cafe/2009-April/060673.html 3]).

 If I had to replace `type family Label a` by `type Label = ???`, I
 wouldn't have anything to put in the right-hand side.

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


More information about the Glasgow-haskell-bugs mailing list