Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,265
    • Issues 4,265
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 419
    • Merge Requests 419
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #10930

Closed
Open
Opened Oct 03, 2015 by Herbert Valerio Riedel@hvr🕺Maintainer

missing empty-Enumeration and out-of-range warning for `Natural`

GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help
λ:2> :set -XNegativeLiterals 
λ:3> (-123) :: Word

<interactive>:3:2: Warning: Literal -123 is out of the Word range 0..18446744073709551615
18446744073709551493
it :: Word

λ:4> (-123) :: Numeric.Natural.Natural
*** Exception: arithmetic underflow

λ:5>
λ:6> [10..3] :: [Word]
<interactive>:6:1: Warning: Enumeration is empty
[]
it :: [Word]

λ:7> [10..3] :: [Numeric.Natural.Natural]
[]
it :: [GHC.Natural.Natural]
Edited Mar 10, 2019 by Herbert Valerio Riedel
Assignee
Assign to
8.8.1
Milestone
8.8.1 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#10930