Skip to content

Parser/Type error for + and - #98

Open
@jonmountjoy

Description

I think #90 from @jeffreyrosenbluth introduced a bug. At least, I think it was that commit.

Prior to this commit (ie. using #1e609fb), you can do something like the following:

Poly> 2 + 3
5 : Int

Now, I get the following:

Poly> 2 + 3
Cannot unify types:
	Int
with
	Int -> a

Weirdly, it works for the * operator, but fails only for + and -:

I suspect there's something weird going on in the parser because:

Poly> 2 + x
"<stdin>" (line 1, column 5):
unexpected "x"
expecting digit
Poly> 2 * x
4 : Int

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions