[GHC] #2456: For higher kinds, instance declarations need quantification in the context

GHC cvs-ghc at haskell.org
Sat Feb 2 20:54:24 CET 2013


#2456: For higher kinds, instance declarations need quantification in the context
-------------------------------+--------------------------------------------
  Reporter:  ronwalf           |          Owner:         
      Type:  feature request   |         Status:  new    
  Priority:  normal            |      Milestone:  _|_    
 Component:  Compiler          |        Version:  6.9    
Resolution:                    |       Keywords:         
        Os:  Unknown/Multiple  |   Architecture:  x86    
   Failure:  None/Unknown      |     Difficulty:  Unknown
  Testcase:                    |      Blockedby:         
  Blocking:                    |        Related:         
-------------------------------+--------------------------------------------
Changes (by morabbin):

  * failure:  => None/Unknown
  * os:  MacOS X => Unknown/Multiple


Comment:

 Once one adds
 {{{
 {-# LANGUAGE OverlappingInstances, TypeOperators,
     StandaloneDeriving, MultiParamTypeClasses,
     FlexibleInstances, DeriveDataTypeable #-}
 }}}
 7.6.1 yields:
 {{{
 1 of 1] Compiling DerivingError    ( DerivingError.hs, interpreted )

 DerivingError.hs:81:1:
     Duplicate type signature:
       DerivingError.hs:81:1-33: $tExpr :: Data.Data.DataType
       DerivingError.hs:80:1-35: $tExpr :: Data.Data.DataType

 DerivingError.hs:81:1:
     Duplicate type signature:
       DerivingError.hs:81:1-33: $cIn :: Data.Data.Constr
       DerivingError.hs:80:1-35: $cIn :: Data.Data.Constr
 }}}
 Is this the expected behavior?

 Type system question: do we know that all of these extensions play nicely
 in a type-theoretic sense? Is the argument that, since they're all
 expressible in System F_C, we're okay?

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



More information about the ghc-tickets mailing list