
#15884: Completeness of View Patterns With a Complete Set of Output Patterns -------------------------------------+------------------------------------- Reporter: Shayan-Najd | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.2 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: -------------------------------------+------------------------------------- For example, the code {{{#!hs {-# OPTIONS_GHC -Wall #-} {-# LANGUAGE ViewPatterns #-} f :: Maybe a -> Bool f (id->Nothing) = False f (id->(Just _)) = True }}} mistakenly returns the warning {{{ warning: [-Wincomplete-patterns] Pattern match(es) are non-exhaustive In an equation for âfâ: Patterns not matched: _ | 4 | f (id->Nothing) = False | ^^^^^^^^^^^^^^^^^^^^^^^^... }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15884 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler