Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
C
curry-frontend
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 3
    • Merge Requests 3
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • curry
  • curry-frontend
  • Issues
  • #86

Closed
Open
Opened Feb 10, 2020 by Fredrik Wieczerkowski@fwcdDeveloper

Split multi-branch unreachability warnings

Currently, if multiple branches in a case expression are unreachable, a single warning message is emitted:

module MultiBranch where

test x = case x of
    1 -> 2
    _ -> 3
    _ -> 4
    _ -> 5
    _ -> 6
..\curry-playground\MultiBranch.curry, line 4.5: Warning:
    Pattern matches are potentially unreachable
    In a case alternative:
      _
      _
      _ -> ...

It would be nice, however, to split this up into multiple warning messages to provide accurate line information for each branch:

..\curry-playground\MultiBranch.curry, line 6.5: Warning:
    Pattern match is potentially unreachable
    In a case alternative:
      _ -> ...

..\curry-playground\MultiBranch.curry, line 7.5: Warning:
    Pattern match is potentially unreachable
    In a case alternative:
      _ -> ...

..\curry-playground\MultiBranch.curry, line 8.5: Warning:
    Pattern match is potentially unreachable
    In a case alternative:
      _ -> ...
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: curry/curry-frontend#86