[Haskell-cafe] View patterns and warnings about overlapping or non-exhaustive patterns

Svein Ove Aas svein.ove at aas.no
Wed Mar 11 12:25:32 EDT 2009


On Wed, Mar 11, 2009 at 5:22 PM, Stephan Friedrichs
<deduktionstheorem at web.de> wrote:
> Hi,
>
> I'm working on a data structure that uses Data.Sequence a lot, so views
> are important and I tried to simplify my code using view patterns.
>
> The problem is, that I keep getting warnings about both overlapping and
> non-exhaustive pattern matches. A simple test case:
>
The view pattern implementation is currently incomplete, specifically
in that it is unable to decide whether a pattern match using them is
overlapping or non-exhaustive. Arguably the warnings should be
suppressed instead..

For the time being, it will *work*, you just won't get useful
warnings. Hopefully it's going to be fixed for 10.2.

-- 
Svein Ove Aas


More information about the Haskell-Cafe mailing list