on master help sign in
Fix bug in cycle detection of patterns with only one variable

It used to put $ between all variable names, but if there was only one, it did not create a new name! The new code just adds a $ on front for everything.

commit261b7ff20937d299ded8316b864e84d30f84a650 authorEvan Czaplicki <evancz@users.noreply.github.com> dateTue 16 Jan 2018, 20:59 (9 years ago) parent3f5f808
1 file changed+1−1
src/Canonicalize/Expression.hs+1−1
src/Canonicalize/Expression.hs+1−1
@@ -436,7 +436,7 @@ addDefNodes env nodes def =
436436 (\freeLocals warnings cbody ->
437437 let
438438 names = getPatternNames [] pattern
439− name = Text.intercalate "$" (map A.toValue names)
439+ name = Text.cons '$' (Text.intercalate "$" (map A.toValue names))
440440 node = ( Destruct cpattern cbody, name, Map.keys freeLocals )
441441 in
442442 good