|
[ ghc-Bugs-1300895 ] Incomplete pattern warnings with GADTs: msg#00092lang.haskell.glasgow.bugs
Bugs item #1300895, was opened at 2005-09-23 14:12 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1300895&group_id=8032 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Bjorn Bringert (bring) Assigned to: Nobody/Anonymous (nobody) Summary: Incomplete pattern warnings with GADTs Initial Comment: {- With GADTs, -fwarn-incomplete-patterns complains about missing impossible cases. -} {-# OPTIONS_GHC -fglasgow-exts -fwarn-incomplete-patterns #-} data Var = Var data Typ = Typ data Tree a where V :: String -> Tree Var T_int :: Tree Typ getId :: Tree Var -> String getId (V x) = x --getId T_int = "T_int" {- With the last line commented out: gadt-pattern-warning.hs:11:0: Warning: Pattern match(es) are non-exhaustive In the definition of `getId': Patterns not matched: T_int Ok, modules loaded: Main. With the last line not commented out: gadt-pattern-warning.hs:12:6: Inaccessible case alternative: Can't match types `Typ' and `Var' When checking the pattern: T_int In the definition of `getId': getId T_int = "T_int" Failed, modules loaded: none. -} ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1300895&group_id=8032
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-1300803 ] ghc-6.4.1: ghc-6.4.1: panic, SourceForge.net |
|---|---|
| Next by Date: | [ ghc-Bugs-1303232 ] parse error on input `\' when using -cpp, SourceForge.net |
| Previous by Thread: | [ ghc-Bugs-1300803 ] ghc-6.4.1: ghc-6.4.1: panic, SourceForge.net |
| Next by Thread: | [ ghc-Bugs-1303232 ] parse error on input `\' when using -cpp, SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |