[GHC] #8539: Data.Complex shouldn't use default implementation of (**)
GHC
ghc-devs at haskell.org
Tue Feb 10 08:18:03 UTC 2015
#8539: Data.Complex shouldn't use default implementation of (**)
-------------------------------------+-------------------------------------
Reporter: jjaredsimpson | Owner:
Type: bug | Status: new
Priority: low | Milestone: 7.12.1
Component: Prelude | Version: 7.6.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by lukyanov):
Replying to [comment:39 ekmett]:
> Hacking up your patch to change the shadowing `x` and two shadowing `y`s
should do it. e.g.
>
> {{{
> - ((re:+im), y)
> - | (isInfinite re || isInfinite im) -> case y of
> + ((re:+im), y')
> + | (isInfinite re || isInfinite im) -> case y' of
>
> - (x, y) -> exp (log x * y)
> + (x', y') -> exp (log x' * y')
> }}}
Or just without duplicating them:
{{{
- ((re:+im), y)
+ ((re:+im), _)
- (x, y) -> exp (log x * y)
+ _ -> exp (log x * y)
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8539#comment:40>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list