MLPolyR icon indicating copy to clipboard operation
MLPolyR copied to clipboard

About the interpreter

Open LdBeth opened this issue 5 years ago • 3 comments

Now we have a lambda rep based interpretation, however it is buggy and limited in certain ways:

  • It doesn't implement runtime I/O, and because the type checker requires top-level to be integer, it can only do integer arithmetic.

  • It can't even do integer arithmetic right, because the design represents integer as even number Int32 so it can be distinguished from pointers, which uses odd number Int32, and the the convention's done at parsing time, but the lambda interpreter is written for regular integers.

LdBeth avatar May 07 '19 04:05 LdBeth

TODOs:

  • [X] fix the arith ops to work with the even representation https://github.com/owo-lang/MLPolyR/commit/fed3773891e8a644bcb18f33750112cc1577fa8d
  • [ ] add support for I/O

LdBeth avatar May 07 '19 05:05 LdBeth

tql

ice1000 avatar May 07 '19 06:05 ice1000

Stuffs like typical length on a list raise runtime error says “integer is required, ” the exact cause needs to investigate.

LdBeth avatar May 07 '19 20:05 LdBeth