Custom Query (7507 matches)
Results (28 - 30 of 7507)
|#28||Fixed||Manual misleading about --make||nobody||nobody|
The postscript version of the manual (pp. 48, 49) gives the impression that one of the most useful options is "-make". This option is not recognised: it should be "--make". "--help" does not list this option (I think it should!). Incidentally, in the online help the term "illiterate Haskell" seems too cute. I think "plain Haskell" would be preferable.
|#29||invalid||Check for exhaustive patterns is broken||nobody|
When some of the patterns in a function definition or case expression contain guards, the compiler gives false warnings about non-exhaustive pattern matches. A pity, because this kind of warning is very useful indeed! For example, I get >ghc --make -Wall See.hs ghc-5.02.1: chasing modules from: See.hs Compiling See ( See.hs, ./See.o ) See.hs:17: Warning: Pattern match(es) are non-exhaustive In the definition of `insert': Patterns not matched: _ _ (TREE _ _ _ _) See.hs:41: Warning: Pattern match(es) are non-exhaustive In a case alternative EMPTY: Patterns not matched: TREE _ _ _ _ for the attached file. [I am not sure filling in the e-mail address box had any effect on the last two complaints I submitted, so I repeat my address here: [email protected]]
|#30||Duplicate||Check for exhaustive patterns continued||nobody||nobody|
An atttempt to attach a file to the last submission resulted in the following message from Netscape (?): Fatal error: Call to a member function on a non-object in common/tracker/ArtifactFile.class on line 106 So I include the file below (the line numbers will be changed), ================================ module See where data Tree key value = EMPTY | TREE key value (Tree key value) (Tree key value) insert :: ( Ord key ) => key -> value -> -- insert this new key and value Tree key value -> -- into this tree Maybe (Tree key value) -- to form (Just new tree ), -- or Nothing if key is present insert k v EMPTY = Just (TREE k v EMPTY EMPTY) insert k v (TREE k' v' left right) | k < k' = case insert k v left of Nothing -> Nothing Just left' -> Just (TREE k' v' left' right) | k > k' = case insert k v right of Nothing -> Nothing Just right' -> Just (TREE k' v' left right') | k == k' = Nothing -- Same with a case expression: insert' :: ( Ord key ) => key -> value -> Tree key value -> Maybe (Tree key value) insert' k v t = case t of EMPTY -> Just (TREE k v EMPTY EMPTY) (TREE k' v' left right) | k < k' -> case insert' k v left of Nothing -> Nothing Just left' -> Just (TREE k' v' left' right) | k > k' -> case insert' k v right of Nothing -> Nothing Just right' -> Just (TREE k' v' left right') | k == k' -> Nothing -- Nonsensical, but patterns without guards: insert'' :: key -> value -> Tree key value -> Maybe (Tree key value) insert'' _ _ EMPTY = Nothing insert'' k v (TREE _ _ left right) = Just (TREE k v left right) ======================================
Note: See TracQuery for help on using queries.