[GHC] #14377: some results not expected with the addition

GHC ghc-devs at haskell.org
Mon Oct 23 14:35:04 UTC 2017


#14377: some results not expected with the addition
-------------------------------------+-------------------------------------
        Reporter:  vanto             |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      Resolution:  invalid           |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect result  |  Unknown/Multiple
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by svenpanne):

 Just a few more hints why this is not a bug (all from the Haskell Report):

 * Numerical literals with a dot in it have an implicit `fromRational`
 around it.

 * Not surprisingly, `fromRational` forces its 1st argument to be a
 `Rational`.

 * The default default is `default (Integer, Double)`.

 * `(**) :: Floating a => a -> a -> a`.

 With that information you can figure out why e.g. the division in a) is a
 different kind of division than the one in b).

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14377#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list