[GHC] #13211: NegativeLiterals -0.0 :: Double
GHC
ghc-devs at haskell.org
Sun Feb 19 15:10:58 UTC 2017
#13211: NegativeLiterals -0.0 :: Double
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.1
Resolution: | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Nolan):
I'm new to ghc and this is my first ticket.
Patch above dosn't work as expected. I changed rule for negative floating
point literals so that it triggers(as I believe) only on non zero
literals. Having that this shouldn't change default(without
-XNegativeLiterals) behaviour of lexer for such cases.
But for some reason it doesn't work. Non zero literals look to be correct
as well as positive zero but negative zero produces such error. I don't
know what it means and can't find source of this error. Searching though
whole project for those messages and function it didn't help. What can it
be?
{{{
nolan at NolanPC:~/ghc$ ./inplace/bin/ghc-stage2 -XNegativeLiterals -e "-0.0"
<interactive>:0:1: error:
• Non type-variable argument in the constraint: Num (a -> b)
(Use FlexibleContexts to permit this)
• When checking the inferred type
it :: forall b c a. (Num (a -> b), Num (b -> c)) => a -> c
}}}
Maybe I get this wrong and this trick will not work. Do you have any ideas
of how this feature should be implemented?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13211#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list