Mizero / grammatical-framework

Automatically exported from code.google.com/p/grammatical-framework
0 stars 0 forks source link

Cannot use an overloaded operator in table defined using square brackets #68

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When compiling the attached example, I get the following error: 

$ gf -make Abstract.gf Concrete.gf
- compiling /tmp/gregoire-19.1656-HVXan8/Concrete.gf... gf: Internal error in 
Compute.ConcreteNew:
    /tmp/gregoire-19.1656-HVXan8/Concrete.gf:13:
        In d: myOper2 is not defined in resource Concrete
OCCURRED IN
myOper2
OCCURRED IN
myOper2 "hello"
OCCURRED IN
table P [myOper2 "hello"]

Original issue reported on code.google.com by gregoire...@gmail.com on 19 May 2013 at 3:30

Attachments:

GoogleCodeExporter commented 8 years ago
All versions of GF I tested (back to gf-3.2) have problem with file. With the 
old partial evaluator, there is a problem with myOper1...

Original comment by hallg...@chalmers.se on 11 Nov 2013 at 5:58

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Add proper type checking of course-of-values tables:

 + Make sure that all subterms have the same type.
 + Resolve overloaded operators.

Note though that the GF book states in C.4.12 that the "course-of-values 
table [...] format is not recommended for GF source code, since the
ordering of parameter values is not specified and therefore a
compiler-internal decision."

Original comment by hallg...@chalmers.se on 12 Nov 2013 at 2:03