on master help sign in
Slightly less annoying name choice

x, y, z, x1, y1, ... instead of x, x1, x2, ... when no other hint for names is given

commitebf7a7630577455c903da24707f2825ceffe7552 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateWed 29 Jul 2015, 11:35 (11 years ago) parentb49c2fd
1 file changed+4−2
src/Idris/CaseSplit.hs+4−2
src/Idris/CaseSplit.hs+4−2
@@ -361,9 +361,11 @@ getClause l fn fp
361361 getNameFrom i used (PApp fc f as) = getNameFrom i used f
362362 getNameFrom i used (PRef fc _ f)
363363 = case getNameHints i f of
364− [] -> uniqueName (sUN "x") used
364+ [] -> uniqueNameFrom (mkSupply [sUN "x", sUN "y",
365+ sUN "z"]) used
365366 ns -> uniqueNameFrom (mkSupply ns) used
366− getNameFrom i used _ = uniqueName (sUN "x") used
367+ getNameFrom i used _ = uniqueNameFrom (mkSupply [sUN "x", sUN "y",
368+ sUN "z"]) used
367369
368370 -- write method declarations, indent with 4 spaces
369371 mkClassBodies :: IState -> [(Name, (FnOpts, PTerm))] -> String