#1121: Error message "Expecting a function type, but found `w_a1Kh'"
----------------------------------------+-----------------------------------
    Reporter:  [EMAIL PROTECTED]           |       Owner:       
        Type:  bug                      |      Status:  new  
    Priority:  normal                   |   Milestone:       
   Component:  Compiler (Type checker)  |     Version:  6.4.2
    Severity:  normal                   |    Keywords:       
  Difficulty:  Unknown                  |    Testcase:       
Architecture:  x86                      |          Os:  Linux
----------------------------------------+-----------------------------------
When compiling with GHC or loading into GHCi the following module I get a
 strange error:

 module Bla where

 bla :: String -> String
 bla x = unwords $ [ ('#':) ]

 The error is:

 Bug.hs:4:20:
     Expecting a function type, but found `w_a1bp'
       Expected type: String
       Inferred type: [Char] -> [Char]
     In the expression: ('#' :)
     In the list element: ('#' :)

 Writing the function as:

 bla = words [ ('#':) ]

 produces the correct error message with [Char] instead of `w_a1bp'.

 I was doing this with GHC-6.4.2 on Ubuntu with a 2.6.17 kernel.

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