#1769: Deriving Typeable for data families
-------------------------------------------------+--------------------------
  Reporter:  chak                                |          Owner:  chak        
    
      Type:  task                                |         Status:  closed      
    
  Priority:  low                                 |      Milestone:  7.0.1       
    
 Component:  Compiler (Type checker)             |        Version:  6.9         
    
Resolution:  fixed                               |       Keywords:              
    
  Testcase:  indexed-types/should_compile/T1769  |      Blockedby:              
    
Difficulty:  Unknown                             |             Os:  
Unknown/Multiple
  Blocking:                                      |   Architecture:  
Unknown/Multiple
   Failure:  None/Unknown                        |  
-------------------------------------------------+--------------------------

Comment(by heatsink):

 Replying to [comment:10 mitar]:

 As a workaround, you can derive from Typeable without this feature by
 writing your own instance.

 {{{
 data family T a

 instance Typeable a => Typeable (T a) where
   typeOf x = mkTyConApp (mkTyCon "T") [typeOf (unT x)]
     where
       unT :: T a -> a
       unT = undefined
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to