|
Re: [GHC] #366: incomplete patterns and GADT: msg#00171lang.haskell.glasgow.bugs
#366: incomplete patterns and GADT -----------------------------+---------------------------------------------- Reporter: nobody | Owner: nobody Type: feature request | Status: assigned Priority: normal | Milestone: 6.8 Component: None | Version: None Severity: minor | Resolution: None Keywords: | Difficulty: Unknown Testcase: tc215 | Architecture: Unknown Os: Unknown | -----------------------------+---------------------------------------------- Changes (by igloo): * architecture: => Unknown * difficulty: => Unknown * milestone: => 6.8 * testcase: => tc215 * os: => Unknown Old description: > {{{ > I would like to compile with > -fwarn-incomplete-patterns and use GADTs, > but I have bogus error messages. > Suppose I define : > > data T a where > C1 :: T Char > C2 :: T Float > > then a function : > > exhaustive :: T Char -> Char > exhaustive C1 = ' ' > > If I compile with incomplete pattern warnings, > I get that my function "exhaustive" is not > exhaustive. > But if I add a case : > > exhaust C2 = ' ' > > then the compiler accurately warns me that this > case is inaccessible. > Would it be possible to add the accessibility check > when compiling with incomplete patterns detection ? > }}} New description: {{{ I would like to compile with -fwarn-incomplete-patterns and use GADTs, but I have bogus error messages. Suppose I define : data T a where C1 :: T Char C2 :: T Float then a function : exhaustive :: T Char -> Char exhaustive C1 = ' ' If I compile with incomplete pattern warnings, I get that my function "exhaustive" is not exhaustive. But if I add a case : exhaust C2 = ' ' then the compiler accurately warns me that this case is inaccessible. Would it be possible to add the accessibility check when compiling with incomplete patterns detection ? }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/366> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler_______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@xxxxxxxxxxx http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [GHC] #955: more object-code blow-up in ghc-6.6 vs. ghc-6.4.2 (both with optimization), GHC |
|---|---|
| Next by Date: | Re: [GHC] #367: Infinite loops can hang Concurrent Haskell, GHC |
| Previous by Thread: | [GHC] #955: more object-code blow-up in ghc-6.6 vs. ghc-6.4.2 (both with optimization), GHC |
| Next by Thread: | Re: [GHC] #366: incomplete patterns and GADT, GHC |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |