on master help sign in
Fix bracket bug in case generation
2dfba31Edwin Brady
src/Idris/CaseSplit.hs+2−2
@@ -349,8 +349,8 @@ replaceSplits l ups impossible
349 updatePat start n tm (c:rest) = c : updatePat (not ((isAlphaNum c) || c == '_')) n tm rest
349 updatePat start n tm (c:rest) = c : updatePat (not ((isAlphaNum c) || c == '_')) n tm rest
350
350
351 addBrackets tm | ' ' `elem` tm
351 addBrackets tm | ' ' `elem` tm
352− , not (isPrefixOf "(" tm)
352+ , not (isPrefixOf "(" tm && isSuffixOf ")" tm)
353− , not (isSuffixOf ")" tm) = "(" ++ tm ++ ")"
353+ = "(" ++ tm ++ ")"
354 | otherwise = tm
354 | otherwise = tm
355
355
356
356