Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation hangs on an error in functor #80

Open
inariksit opened this issue Oct 26, 2020 · 0 comments
Open

Compilation hangs on an error in functor #80

inariksit opened this issue Oct 26, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@inariksit
Copy link
Member

The problem

Say you are implementing the Foods grammar (any language will do, I chose German arbitrarily) and make the following typo.

concrete FoodsGer of Foods = FoodsI with 
  (Syntax = SyntaxGer),
  (LexFoods = LexFoods) ;

That is, the last line says (LexFoods = LexFoods), instead the expected (LexFoods = LexFoodsGer).

When compiling the grammar, it just hangs without any errors, stopping at the type checking phase.

$ gf -v FoodsGer.gf
…
- parsing FoodsGer.gf
  renaming 
  type checking  

Interestingly, if I typo the line (Syntax=SyntaxGer) as (Syntax=Syntax), I get an error immediately. This gets printed for every function in the grammar, I omitted the rest for brevity.

- parsing FoodsGer.gf
  renaming 
  type checking 

FoodsGer.gf:
   /Users/inari/work/GF/gf-contrib/foods/FoodsI.gf:19:
     Happened in linearization of Wine
      no overload instance of Syntax.mkCN
      with value type {s : Str}
      for argument list
        {s : Number => Case => Str; co : Str; g : Gender; lock_N : {};
         uncap : {s : Number => Case => Str; co : Str}}
      among alternatives
        N
        …
        CN NP
FoodsGer.gf:
   /Users/inari/work/GF/gf-contrib/foods/FoodsI.gf:17:
     Happened in linearization of Very
      cannot infer type of constant very_AdA

Not related to MonadFail

I rolled back to a version from February, and I get the same behaviour. So this cannot be related to the MonadFail fix that caused the infinite loop in #79.

@inariksit inariksit added the bug Something isn't working label Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant