#5695: Ghci type inference to [()] -> String, when should be Show a => [a] ->
Striing
----------------------------------------+-----------------------------------
  Reporter:  guest                      |          Owner:                  
      Type:  bug                        |         Status:  closed          
  Priority:  normal                     |      Milestone:                  
 Component:  Compiler                   |        Version:  7.0.3           
Resolution:  invalid                    |       Keywords:                  
        Os:  Unknown/Multiple           |   Architecture:  Unknown/Multiple
   Failure:  GHC rejects valid program  |     Difficulty:  Unknown         
  Testcase:                             |      Blockedby:                  
  Blocking:                             |        Related:                  
----------------------------------------+-----------------------------------
Changes (by simonmar):

  * status:  new => closed
  * difficulty:  => Unknown
  * resolution:  => invalid


Comment:

 This is working correctly.  To get the result you expect, either put the
 type signature on `test` itself:

 {{{
 let test = intercalate ";" . map (\a -> "Id=" ++ show a); test :: Show a
 => [a] -> String
 }}}

 or `:set -XNoMonomorphismRestriction`.  Maybe someday we'll turn off the
 MR by default.

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