[GHC] #15286: "Can't use Natural in base" when compiling GHC.Natural with -O0

GHC ghc-devs at haskell.org
Mon Jun 18 15:43:53 UTC 2018


#15286: "Can't use Natural in base" when compiling GHC.Natural with -O0
-------------------------------------+-------------------------------------
        Reporter:  alpmestan         |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  libraries/base    |              Version:  8.5
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Building GHC      |  Unknown/Multiple
  failed                             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by sighingnow):

 With `-O0`, if we remove the methods `+` and `-` from the `instance Num
 Natural` then everything works well.

 Link:
 https://git.haskell.org/ghc.git/blob/fe770c211631e7b4c9b0b1e88ef9b6046c6585ef:/libraries/base/GHC/Num.hs#l127

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


More information about the ghc-tickets mailing list