Skip to content

Commit

Permalink
parser: Location of typevars includes the quote
Browse files Browse the repository at this point in the history
This extends the location attached to type variables to include the
preceding quote. Before:

    1 | let x:(([`A] as 'a)* ([`B] as 'a)) = [`A]
                                       ^

After:

    1 | let x:(([`A] as 'a)* ([`B] as 'a)) = [`A]
                                      ^^

The quote is not included in the AST but is logically part of the ident
as suggested by this error message:

    1 | fun (x : 'a t as 'a) -> ();;
                          ^
    Error: This alias is bound to type "'a t" but is used as an instance of type "'a"
           The type variable "'a" occurs inside "'a t"
  • Loading branch information
Julow committed Oct 25, 2023
1 parent abee025 commit e8a7060
Show file tree
Hide file tree
Showing 6 changed files with 3,322 additions and 3,345 deletions.
Loading

0 comments on commit e8a7060

Please sign in to comment.