[GHC] #2855: Surprising type (family) type derived

GHC trac at galois.com
Mon Dec 8 10:53:27 EST 2008


#2855: Surprising type (family) type derived
------------------------------+---------------------------------------------
 Reporter:  guest             |          Owner:                  
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Milestone:                  
Component:  Compiler          |        Version:  6.10.1          
 Severity:  normal            |     Resolution:                  
 Keywords:                    |       Testcase:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
------------------------------+---------------------------------------------
Comment (by guest):

 Here's more of the same kind:
 {{{
 {-# LANGUAGE TypeFamilies, FlexibleContexts #-}
 module Bug8 where

 class C a where
     type T a
     type U a
     x :: U a -> T a

 --foo :: (C a) => U a -> T a
 foo ua = x ua
 }}}
 This compiles, and the type of foo is the one in the signature.
 But if the signature is included there are type errors.

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


More information about the Glasgow-haskell-bugs mailing list