#6030: Typeclass constraint should pick the OverloadedString type.
---------------------------------+------------------------------------------
    Reporter:  GregWeber         |       Owner:                  
        Type:  feature request   |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.4.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by GregWeber):

 ExtendedDefaultRules is good but not fully covering my use cases of data
 types built of IsString, so I am still very interested in proposing
 something here or improving ExtendedDefaultRules. The following does not
 compile:


 {{{
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE ExtendedDefaultRules #-}
 {-# LANGUAGE FlexibleInstances #-}
 module Default (noDefault) where
 import Data.Text as T
 default (T.Text)

 class    NoDefault a        where noDefault :: a -> [Text]
 instance NoDefault [T.Text] where noDefault = id

 main = print (noDefault ["Hello!"])
 }}}

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