[GHC] #15031: [1,1..0] /= [1,1..2]

GHC ghc-devs at haskell.org
Thu Apr 12 13:34:32 UTC 2018


#15031: [1,1..0] /= [1,1..2]
-------------------------------------+-------------------------------------
           Reporter:  sgraf          |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.6.1
          Component:                 |           Version:  8.2.2
  libraries/base                     |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 I'm currently refactoring `efdtIntFB` into something that fuses better
 (#8763).

 While testing my prototype, I noticed that in current base `[1,1..x]` for
 `x` < 1 has different behavior than I expected: `[1,1..0] == []`. In
 comparison, the `x` == 1 or > 1 case yields `repeat 1`.

 Is this expected and/or specified somewhere? If so, I find this rather
 surprising.

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


More information about the ghc-tickets mailing list