[ ghc-Feature Requests-1189559 ] incomplete patterns and GADT
SourceForge.net
noreply at sourceforge.net
Mon Apr 25 11:29:07 EDT 2005
Feature Requests item #1189559, was opened at 2005-04-25 08:29
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=358032&aid=1189559&group_id=8032
Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: incomplete patterns and GADT
Initial Comment:
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 ?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=358032&aid=1189559&group_id=8032
More information about the Glasgow-haskell-users
mailing list