diff options
| author | Inari Listenmaa <inari.listenmaa@gmail.com> | 2020-06-04 19:56:31 +0200 |
|---|---|---|
| committer | Inari Listenmaa <inari.listenmaa@gmail.com> | 2020-06-04 19:56:31 +0200 |
| commit | a4e3bce6bba915ea9dba0c1a34519f9cde9d243e (patch) | |
| tree | 6fa5dedc69181cd84334b713b09fb80eab54c684 /src/compiler | |
| parent | 9a903c166f8e41da0fc23cfbad7b8cc4bcfb2fcc (diff) | |
Add clarification to "Pattern is not linear" error msg.
Diffstat (limited to 'src/compiler')
| -rw-r--r-- | src/compiler/GF/Compile/Compute/ConcreteNew.hs | 2 | ||||
| -rw-r--r-- | src/compiler/GF/Compile/Rename.hs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/GF/Compile/Compute/ConcreteNew.hs b/src/compiler/GF/Compile/Compute/ConcreteNew.hs index a9ae63960..0edf43c8d 100644 --- a/src/compiler/GF/Compile/Compute/ConcreteNew.hs +++ b/src/compiler/GF/Compile/Compute/ConcreteNew.hs @@ -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 diff --git a/src/compiler/GF/Compile/Rename.hs b/src/compiler/GF/Compile/Rename.hs index 5eb83cd4b..aacf24c5b 100644 --- a/src/compiler/GF/Compile/Rename.hs +++ b/src/compiler/GF/Compile/Rename.hs @@ -236,7 +236,7 @@ renamePattern :: Status -> Patt -> Check (Patt,[Ident]) renamePattern env patt = do r@(p',vs) <- renp patt let dupl = vs \\ nub vs - unless (null dupl) $ checkError (hang ("[C.4.13] Pattern is not linear:") 4 + unless (null dupl) $ checkError (hang ("[C.4.13] Pattern is not linear. All variable names on the left-hand side must be distinct.") 4 patt) return r where |
