on master help sign in
Minor fix for variable update in case split
commit775acd3592ac155e950c8be7a468c1fa8866034c authorEdwin Brady <ecb10@st-andrews.ac.uk> dateMon 2 Dec 2013, 23:32 (13 years ago) parent45d2fd0
1 file changed+2−2
src/Idris/CaseSplit.hs+2−2
src/Idris/CaseSplit.hs+2−2
@@ -286,9 +286,9 @@ replaceSplits l ups = updateRHSs 1 (map (rep (expandBraces l)) ups)
286286 '{' : space ++ updatePat False n tm rest'
287287 updatePat True n tm xs@(c:rest) | length xs > length n
288288 = let (before, after@(next:_)) = splitAt (length n) xs in
289− if (before == n && not (isAlpha next))
289+ if (before == n && not (isAlphaNum next))
290290 then addBrackets tm ++ updatePat False n tm after
291− else c : updatePat (not (isAlpha c)) n tm rest
291+ else c : updatePat (not (isAlphaNum c)) n tm rest
292292 updatePat start n tm (c:rest) = c : updatePat (not (isAlpha c)) n tm rest
293293
294294 addBrackets tm | ' ' `elem` tm = "(" ++ tm ++ ")"