Commit e3a3648e authored by Björn Peemöller 's avatar Björn Peemöller
Browse files

Temporarily disabled overlapping warnings (broken)

parent 23dedde4
......@@ -280,8 +280,8 @@ checkFunctionPatternMatch p f eqs = do
warnMissingPattern p loc nonExhaustive
unless (null overlapped) $ warnFor WarnNondetPatterns $ report $
warnOverlapPattern p loc (idName f) "=" overlapped
when nondet $ warnFor WarnOverlapping $ report $
warnNondetOverlapping p ("Function " ++ escName f)
-- when nondet $ warnFor WarnOverlapping $ report $
-- warnNondetOverlapping p ("Function " ++ escName f)
-- Check an equation for warnings.
-- This is done in a seperate scope as the left-hand-side may introduce
......@@ -426,9 +426,10 @@ getTyScheme q = do
"Checks.WarnCheck.getTyScheme: " ++ show q
warnMissingTypeSignature :: ModuleIdent -> Ident -> TypeScheme -> Message
warnMissingTypeSignature mid i tys = posMessage i $ hsep (map text
["Top-level binding with no type signature:", showIdent i, "::"])
<+> ppTypeScheme mid tys
warnMissingTypeSignature mid i tys = posMessage i $ fsep
[ text "Top-level binding with no type signature:"
, text (showIdent i) <+> text "::" <+> ppTypeScheme mid tys
]
-- -----------------------------------------------------------------------------
-- Check for overlapping module alias names
......@@ -474,8 +475,8 @@ checkCaseAlts ct alts@(Alt p _ _ : _) = do
warnMissingPattern p loc nonExhaustive
unless (null overlapped) $ warnFor WarnNondetPatterns $ report $
warnOverlapPattern p loc "" "->" overlapped
when nondet $ warnFor WarnOverlapping $ report $
warnNondetOverlapping p ("A fcase expression")
-- when nondet $ warnFor WarnOverlapping $ report $
-- warnNondetOverlapping p ("A fcase expression")
Rigid -> do
unless (null nonExhaustive) $ warnFor WarnIncompletePatterns $ report $
warnMissingPattern p loc nonExhaustive
......
h x = fcase x of
f [] _ = Nothing
f (_ : _) [] = Nothing
f ((_, _) : _) ((_, _) : _) = Nothing
g x = fcase x of
"" -> 0
[] -> 1
i x = fcase x of
g x = fcase x of
[_] -> 0
(_:[]) -> 1
_ -> 2
i x = x
i y = y
j [] = 0
j (_:_) = 0
j x = 1
h x = x
h y = y
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment