[GHC] #10555: RULE left-hand side too complicated to desugar

GHC ghc-devs at haskell.org
Thu Jul 30 19:34:39 UTC 2015


#10555: RULE left-hand side too complicated to desugar
-------------------------------------+-------------------------------------
        Reporter:  yongqli           |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.0.4
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:  yes
      Blocked By:                    |                Blocking:
 Related Tickets:  #10699            |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by thomie):

 * version:  7.10.2-rc1 => 7.0.4


Old description:

> GHC version 7.10.1.20150612 breaks the `fast-math` package, which
> compiled fine on GHC 7.10.1.20150519. To reproduce, run `cabal install
> fast-math`.
>
> {{{
>
> Numeric/FastMath/Approximation.hs:60:1: Warning:
>     RULE left-hand side too complicated to desugar
>       Optimised lhs: case /## y2 x of wild_00 { __DEFAULT ->
>                      (case /## y1 x of wild_X2 { __DEFAULT -> +## wild_X2
> }) wild_00
>                      }
>       Orig lhs: case /## y2 x of wild_00 { __DEFAULT ->
>                 (case /## y1 x of wild_00 { __DEFAULT -> +## wild_00 })
> wild_00
>                 }
>
> Numeric/FastMath/Approximation.hs:63:1: Warning:
>     RULE left-hand side too complicated to desugar
>       Optimised lhs: case /## y2 x of wild_00 { __DEFAULT ->
>                      (case /## y1 x of wild_X2 { __DEFAULT -> -## wild_X2
> }) wild_00
>                      }
>       Orig lhs: case /## y2 x of wild_00 { __DEFAULT ->
>                 (case /## y1 x of wild_00 { __DEFAULT -> -## wild_00 })
> wild_00
>                 }
>
> Numeric/FastMath/Approximation.hs:103:1: Warning:
>     RULE left-hand side too complicated to desugar
>       Optimised lhs: case divideFloat# y2 x of wild_00 { __DEFAULT ->
>                      (case divideFloat# y1 x of wild_X2 { __DEFAULT ->
>                       minusFloat# wild_X2
>                       })
>                        wild_00
>                      }
>       Orig lhs: case divideFloat# y2 x of wild_00 { __DEFAULT ->
>                 (case divideFloat# y1 x of wild_00 { __DEFAULT ->
>                  minusFloat# wild_00
>                  })
>                   wild_00
>                 }
> ghc: panic! (the 'impossible' happened)
>   (GHC version 7.10.1.20150612 for x86_64-unknown-linux):
>         Simplifier ticks exhausted
>   When trying RuleFired float commute left *
>   To increase the limit, use -fsimpl-tick-factor=N (default 100)
>   If you need to do this, let GHC HQ know, and what factor you needed
>   To see detailed counts use -ddump-simpl-stats
>   Total ticks: 4004
>
> Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
> }}}

New description:

 GHC reports the following warnings for the `fast-math` package. To
 reproduce, run `cabal install fast-math==1.0 --with-ghc=ghc-7.10.1`
 (ghc-7.10.2 panics on this package, see #10699).

 {{{

 Numeric/FastMath/Approximation.hs:60:1: Warning:
     RULE left-hand side too complicated to desugar
       Optimised lhs: case /## y2 x of wild_00 { __DEFAULT ->
                      (case /## y1 x of wild_X2 { __DEFAULT -> +## wild_X2
 }) wild_00
                      }
       Orig lhs: case /## y2 x of wild_00 { __DEFAULT ->
                 (case /## y1 x of wild_00 { __DEFAULT -> +## wild_00 })
 wild_00
                 }

 Numeric/FastMath/Approximation.hs:63:1: Warning:
     RULE left-hand side too complicated to desugar
       Optimised lhs: case /## y2 x of wild_00 { __DEFAULT ->
                      (case /## y1 x of wild_X2 { __DEFAULT -> -## wild_X2
 }) wild_00
                      }
       Orig lhs: case /## y2 x of wild_00 { __DEFAULT ->
                 (case /## y1 x of wild_00 { __DEFAULT -> -## wild_00 })
 wild_00
                 }

 Numeric/FastMath/Approximation.hs:103:1: Warning:
     RULE left-hand side too complicated to desugar
       Optimised lhs: case divideFloat# y2 x of wild_00 { __DEFAULT ->
                      (case divideFloat# y1 x of wild_X2 { __DEFAULT ->
                       minusFloat# wild_X2
                       })
                        wild_00
                      }
       Orig lhs: case divideFloat# y2 x of wild_00 { __DEFAULT ->
                 (case divideFloat# y1 x of wild_00 { __DEFAULT ->
                  minusFloat# wild_00
                  })
                   wild_00
                 }
 }}}

--

Comment:

 I changed the description to not include the panic from #10699.

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


More information about the ghc-tickets mailing list