koka-lang / koka

Koka language compiler and interpreter

Home Page:http://koka-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error with final ctl operations

TimWhiting opened this issue · comments

Reported in #452

effect final ctl err-not-found(name: string): a

fun error-handler(eval: () -> <err-not-found|e> int): e string
  with final ctl err-not-found(name) "function not found: " ++ name
  eval().show
compiler threw exception: Type.Infer.checkCoverage: illegal operation field name: final ctl-err-not-found in issues/issuex/@Hnd-err-not-found

Would it be okay if I had a go at fixing it? It looks like the readOperationSort function here is missing a couple of cases (raw ctl and in this case final ctl), which in turn causes the checkCoverage function to fail.

It's late where I am right now, but I could look into it properly tomorrow at some point. If that's more trouble than it's worth, though, no worries!

Don't worry, I can fix it. The issue is a bit more subtle than that. Leaving it with spaces would cause issues in other parts of the compilation (especially since the operation names are written to the core interface files, and would be parsed wrong from those files).

@MrJohz thanks for the offer of contribution though! I'm excited to see more people interested in hacking on Koka and helping with it.