h3rald / min

A small but practical concatenative programming language and shell
https://min-lang.org
MIT License
310 stars 23 forks source link

Wrong Error Location #135

Closed ghost closed 3 years ago

ghost commented 3 years ago

I did:

( symbol use-as
    (int :n 'sym :fun ==> string :r)
    (
        n  fun ->  @r
    )
) ::

5 (pred) use-as puts

Error:

(!) vulcan.min(15,4) [::]: Invalid type 'string' specified in signature at position 6
    vulcan.min(15,4) in symbol: operator
    vulcan.min(15,4) in symbol: ::

The error says problem located at (15,4) not (18, 11) [use place of symbol] Because i trust my symbol.

h3rald commented 3 years ago

Well, the error is there though 😊 it's str instead of string as of 0.31.0.

The reason why it doesn't say the error is where the symbol was used is because... the interpreter never got there, it stopped right at the incorrect operator definition.

ghost commented 3 years ago

Well, the error is there though 😊 it's str instead of string as of 0.31.0.

The reason why it doesn't say the error is where the symbol was used is because... the interpreter never got there, it stopped right at the incorrect operator definition.

Yes you're right... but this one was totally wrong thought by me. You setted an clever error system. I thought as i wanna use trusted-symbol for preventing the error stack trace to not point my symbol but there is not needed, i understood.