#4841: TypeSynonymInstances allow some flexible instances
---------------------------------+------------------------------------------
    Reporter:  benmachine        |       Owner:                             
        Type:  bug               |      Status:  new                        
    Priority:  normal            |   Component:  Compiler                   
     Version:  7.0.1             |    Keywords:                             
    Testcase:                    |   Blockedby:                             
          Os:  Unknown/Multiple  |    Blocking:                             
Architecture:  Unknown/Multiple  |     Failure:  GHC accepts invalid program
---------------------------------+------------------------------------------
 The docs for !TypeSynonymInstances say:

   As always, using a type synonym is just shorthand for writing the RHS of
 the type synonym definition.

 However, there are instances that can be defined with ''only''
 !TypeSynonymInstances enabled that cannot be defined without it. The
 following compiles:

 {{{
 {-# LANGUAGE TypeSynonymInstances #-}
 instance Bounded String where
   minBound = ""
   maxBound = maxBound : maxBound
 }}}

 even though the same with `[Char]` does not.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4841>
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