
#11170: (read ".9") :: Double unable to parse -------------------------------------+------------------------------------- Reporter: varosi | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Prelude | Version: 7.10.2 Resolution: invalid | Keywords: Read Operating System: Windows | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by nomeata): * status: new => closed * resolution: => invalid Comment: It actually is parseable, if you put parens around it: {{{#!hs
:t (.4) (.4) :: Num (a -> b) => (b -> c) -> a -> c }}}
The problem here is that `.` is an operator, so it parses it as `\x -> (.) x 4` (which would type check if you have have an instance `Num (a -> b)`). This is the correct behaviour according to the language specification, and definitely nothing a compiler should do different. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11170#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler