summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/Compute
diff options
context:
space:
mode:
authorInari Listenmaa <inari.listenmaa@gmail.com>2020-06-05 19:39:31 +0200
committerInari Listenmaa <inari.listenmaa@gmail.com>2020-06-05 19:39:31 +0200
commitde8cc02ba58d11957defdc89b6755eeb0b548fde (patch)
treeab0dbb2bb51cef3035a159ca0c163e6a2d8a6e22 /src/compiler/GF/Compile/Compute
parentdbc7297d80c383d3e43148ac526a792ccfb6bbf5 (diff)
Condense the unsupported token gluing as per John's suggestion
Diffstat (limited to 'src/compiler/GF/Compile/Compute')
-rw-r--r--src/compiler/GF/Compile/Compute/ConcreteNew.hs27
1 files changed, 4 insertions, 23 deletions
diff --git a/src/compiler/GF/Compile/Compute/ConcreteNew.hs b/src/compiler/GF/Compile/Compute/ConcreteNew.hs
index 9a8024697..ea55e77cb 100644
--- a/src/compiler/GF/Compile/Compute/ConcreteNew.hs
+++ b/src/compiler/GF/Compile/Compute/ConcreteNew.hs
@@ -297,29 +297,10 @@ glue env (v1,v2) = glu v1 v2
in error $ unlines
[originalMsg
,""
- ,"There was a problem in the expression `" ++ term ++ "`"
- ,"This can be due to two causes, check which one applies in your case."
- ,""
- ,"1) You are trying to use + on runtime arguments. Even if you are using"
- ," `"++term++"` in an oper, make sure that the oper isn't called in a"
- ," linearization that takes arguments. Both of the following are illegal:"
- ,""
- ," lin Test foo bar = foo.s + bar.s <- explicit + in a lin"
- ," lin Test foo bar = opWithPlus foo bar <- the oper uses +"
- ,""
- ,"2) One of the arguments in `"++term++"` is a bound variable"
- ," from pattern matching a string, but the cases are non-exhaustive."
- ," Example:"
- ," case \"test\" of {"
- ," x + \"a\" => x + \"b\" <- no applicable case for \"test\", so x = ???"
- ," } ;"
- ,""
- ," You can fix this by adding a catch-all case in the end:"
- ," { x + \"a\" => x + \"b\" ;"
- ," _ => \"default case\" } ;"
- ,""
- ,"3) If neither applies, submit a bug report and we update the error message."
- ," https://github.com/GrammaticalFramework/gf-core/issues"
+ ,"There was a problem in the expression `"++term++"`, either:"
+ ,"1) You are trying to use + on runtime arguments, possibly via an oper."
+ ,"2) One of the arguments in `"++term++"` is a bound variable from pattern matching a string, but the cases are non-exhaustive."
+ ,"For more help see https://github.com/GrammaticalFramework/gf-core/tree/master/doc/errors/gluing.md"
]