fmease / lushui

The reference compiler of the Lushui programming language
Apache License 2.0
5 stars 0 forks source link

Alias fails instance check #30

Open fmease opened 3 years ago

fmease commented 3 years ago

Example:

Alias: Type = Original

data Original: Type of
    original: Alias

I strongly believe this occurs because of a missing evaluation before checking.

Update: It depends on the order of declarations right now. If the alias is declared after/below the data declaration, the instance check succeeds! Only if the alias is declared before/above the data declaration, it will fail.

Counter-example:

data Original: Type of
    original: Alias

Alias: Type = Original