Merge pull request #1379 from david-christiansen/paren-S-pat
Add parens on generated S patterns
commitcfc2386455602fd0221078ec8f0b15df423a73ee
authorDavid Christiansen <david@davidchristiansen.dk>
dateFri 11 Jul 2014, 14:20 (12 years ago)
parent5b723cb72f7b58
src/Idris/CaseSplit.hs+1−1
@@ -276,7 +276,7 @@ replaceSplits l ups = updateRHSs 1 (map (rep (expandBraces l)) ups)
276276 -- this isn't supported in a pattern, so special case here
277277 nshow (PRef _ (UN z)) | z == txt "Z" = "Z"
278278 nshow (PApp _ (PRef _ (UN s)) [x]) | s == txt "S" =
279− "S " ++ addBrackets (nshow (getTm x))
279+ "(S " ++ addBrackets (nshow (getTm x)) ++ ")"
280280 nshow t = show t
281281
282282 -- if there's any {n} replace with {n=n}