@@ -286,9 +286,9 @@ replaceSplits l ups = updateRHSs 1 (map (rep (expandBraces l)) ups)
286 '{' : space ++ updatePat False n tm rest'
286 '{' : space ++ updatePat False n tm rest'
287 updatePat True n tm xs@(c:rest) | length xs > length n
287 updatePat True n tm xs@(c:rest) | length xs > length n
288 = let (before, after@(next:_)) = splitAt (length n) xs in
288 = let (before, after@(next:_)) = splitAt (length n) xs in
289− if (before == n && not (isAlpha next))
289+ if (before == n && not (isAlphaNum next))
290 then addBrackets tm ++ updatePat False n tm after
290 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
292 updatePat start n tm (c:rest) = c : updatePat (not (isAlpha c)) n tm rest
292 updatePat start n tm (c:rest) = c : updatePat (not (isAlpha c)) n tm rest
294 addBrackets tm | ' ' `elem` tm = "(" ++ tm ++ ")"
294 addBrackets tm | ' ' `elem` tm = "(" ++ tm ++ ")"