1
0
forked from GitHub/gf-core

Add clarification to "Pattern is not linear" error msg.

This commit is contained in:
Inari Listenmaa
2020-06-04 19:56:31 +02:00
parent 9a903c166f
commit a4e3bce6bb
2 changed files with 2 additions and 2 deletions

View File

@@ -546,7 +546,7 @@ value2term' stop loc xs v0 =
linPattVars p =
if null dups
then return pvs
else fail.render $ hang "Pattern is not linear:" 4 (ppPatt Unqualified 0 p)
else fail.render $ hang "Pattern is not linear. All variable names on the left-hand side must be distinct." 4 (ppPatt Unqualified 0 p)
where
allpvs = allPattVars p
pvs = nub allpvs