Opened 6 months ago

#8710 new bug

Overlapping patterns warning misplaced

Reported by: goldfire Owned by:
Priority: low Milestone:
Component: Compiler Version: 7.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect warning at compile-time Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:



{-# OPTIONS_GHC -fwarn-overlapping-patterns #-}

len []    = 0
len (_:t) = 1 + len t
len _     = error "urk"

GHC reports the problem with this definition at the first line of it. I think it would be more helpful to have it at the last line, which is the pattern that will never match.

Change History (0)

Note: See TracTickets for help on using tickets.