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,333
    • Issues 4,333
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 370
    • Merge Requests 370
  • 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
  • #8853

Closed
Open
Opened Mar 06, 2014 by Mikolaj Konarski@MikolajReporter

Surprising mention of unboxed integers in pattern exhaustiveness warning

The attached code produces this alarming warning:

~/waste$ ghc -Wall --make AlarmingPattern.hs -fforce-recomp
[1 of 1] Compiling Main             ( AlarmingPattern.hs, AlarmingPattern.o )

AlarmingPattern.hs:6:7: Warning:
    Pattern match(es) are non-exhaustive
    In an equation for ‘takeFromInv’:
        Patterns not matched:
            (GHC.Types.I# _) (GHC.Types.I# (#x)) with #x `notElem` [0#]
Linking AlarmingPattern ...

The error message is alarming because it refers to unboxed integers, but the source code does not.

Edited Mar 10, 2019 by thomie
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#8853