Re: Non-exhaustive pattern match(es) warning in lambda functions

2010-11-18 Thread Mitar
Hi! On Wed, Nov 17, 2010 at 11:52 AM, Sittampalam, Ganesh ganesh.sittampa...@credit-suisse.com wrote: If GHC added support or patterns, you could write them out quite concisely: bar Foo1 Foo2 Foo3 = ... bar (Foo1|Foo2|Foo3) (Foo1|Foo2|Foo3) (Foo1|Foo2|Foo3) = error ... Uh. Still no nice

Re: Non-exhaustive pattern match(es) warning in lambda functions

2010-11-17 Thread Mitar
Hi! On Thu, Sep 23, 2010 at 2:19 PM, Christian Maeder christian.mae...@dfki.de wrote: I tend to introduce artificial error cases for the Impossible, to avoid warnings, although the compiler generated error messages are better to locate the problem. But this is often problematic. I was also

RE: Non-exhaustive pattern match(es) warning in lambda functions

2010-11-17 Thread Sittampalam, Ganesh
Mitar wrote: Hi! On Thu, Sep 23, 2010 at 2:19 PM, Christian Maeder christian.mae...@dfki.de wrote: I tend to introduce artificial error cases for the Impossible, to avoid warnings, although the compiler generated error messages are better to locate the problem. But this is often

Re: Non-exhaustive pattern match(es) warning in lambda functions

2010-11-16 Thread Christian Maeder
. S | -Original Message- | From: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell- | users-boun...@haskell.org] On Behalf Of Mitar | Sent: 21 September 2010 07:44 | To: glasgow-haskell-users | Subject: Non-exhaustive pattern match(es) warning in lambda functions

Re: Non-exhaustive pattern match(es) warning in lambda functions

2010-11-16 Thread Christian Maeder
...@haskell.org] On Behalf Of Mitar | Sent: 21 September 2010 07:44 | To: glasgow-haskell-users | Subject: Non-exhaustive pattern match(es) warning in lambda functions | | Hi! | | Why GHC does not warn (with -Wall) about non-exhaustive pattern | match(es) warning in lambda functions? For example

Re: Non-exhaustive pattern match(es) warning in lambda functions

2010-09-23 Thread Christian Maeder
pattern match(es) warning in lambda functions | | Hi! | | Why GHC does not warn (with -Wall) about non-exhaustive pattern | match(es) warning in lambda functions? For example, this code: | | data Foo = Bar | Baz | | test1 :: Foo - IO () | test1 Bar = return () -- Pattern match(es

RE: Non-exhaustive pattern match(es) warning in lambda functions

2010-09-23 Thread Simon Peyton-Jones
-haskell- | | users-boun...@haskell.org] On Behalf Of Mitar | | Sent: 21 September 2010 07:44 | | To: glasgow-haskell-users | | Subject: Non-exhaustive pattern match(es) warning in lambda functions | | | | Hi! | | | | Why GHC does not warn (with -Wall) about non-exhaustive pattern | | match

Re: Non-exhaustive pattern match(es) warning in lambda functions

2010-09-23 Thread Christian Maeder
] On Behalf Of Mitar | | Sent: 21 September 2010 07:44 | | To: glasgow-haskell-users | | Subject: Non-exhaustive pattern match(es) warning in lambda functions | | | | Hi! | | | | Why GHC does not warn (with -Wall) about non-exhaustive pattern | | match(es) warning in lambda functions

RE: Non-exhaustive pattern match(es) warning in lambda functions

2010-09-22 Thread Simon Peyton-Jones
| Subject: Non-exhaustive pattern match(es) warning in lambda functions | | Hi! | | Why GHC does not warn (with -Wall) about non-exhaustive pattern | match(es) warning in lambda functions? For example, this code: | | data Foo = Bar | Baz | | test1 :: Foo - IO () | test1 Bar = return () -- Pattern match

Non-exhaustive pattern match(es) warning in lambda functions

2010-09-21 Thread Mitar
Hi! Why GHC does not warn (with -Wall) about non-exhaustive pattern match(es) warning in lambda functions? For example, this code: data Foo = Bar | Baz test1 :: Foo - IO () test1 Bar = return () -- Pattern match(es) are non-exhaustive warning, OK test2 :: Foo - IO () test2 = \Bar - return