fixed minor bug in dedupNames
This commit is contained in:
parent
e6f9d71c57
commit
1ed998c025
1 changed files with 10 additions and 7 deletions
|
|
@ -65,7 +65,10 @@ dedupNames :: Expr -> Expr
|
||||||
dedupNames = go []
|
dedupNames = go []
|
||||||
where
|
where
|
||||||
varName :: [Text] -> Text -> Int -> Text
|
varName :: [Text] -> Text -> Int -> Text
|
||||||
varName bs x k = case bs !!? k of
|
varName bs x k =
|
||||||
|
if x == ""
|
||||||
|
then x
|
||||||
|
else case bs !!? k of
|
||||||
Nothing -> x
|
Nothing -> x
|
||||||
Just x' ->
|
Just x' ->
|
||||||
let count = (length $ filter (== x') $ drop (k + 1) bs)
|
let count = (length $ filter (== x') $ drop (k + 1) bs)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue