Error message referring to pattern matching on runtime strings when using Prelude.notYet
daherb opened this issue · 1 comments
daherb commented
When using Prelude.notYet as a placeholder for missing implementations the following error occurs:
- compiling TestConc.gf... Internal error in GeneratePMCFG:
evalTerm (Predef.error "NOT YET IMPLEMENTED: x")
1) Check that you are not trying to pattern match a /runtime string/.
These are illegal:
lin Test foo = case foo.s of {
"str" => … } ; <- explicit matching argument of a lin
lin Test foo = opThatMatches foo <- calling an oper that pattern matches
2) Not about pattern matching? Submit a bug report and we update the error message.
https://github.com/GrammaticalFramework/gf-core/issues
CallStack (from HasCallStack):
error, called at src/compiler/GF/Compile/GeneratePMCFG.hs:621:13 in gf-3.10.4-EdD6fabQUzM4AhRenbxTb3:GF.Compile.GeneratePMCFG
Minimal grammar;
abstract Test = {
cat A ;
fun x : A -> A ;
}
concrete TestConc of Test = open Prelude in {
lincat
A = SS ;
lin
x = notYet "x" ;
} ;
daherb commented
Recent version compiled from Git
Grammatical Framework (GF) version 3.10.4
Built on linux/x86_64 with ghc-8.6, flags: interrupt server