Add absent terms to get-scope
Input:
type t = Foo | Bar
let x : t = Foo
We can't do anything with both Foo
because there is no definition for Foo
. It's not a reference of any other definition and it's not presented in any scope.
We need to add to get-scope:
- Constructor name
- Type of its arguments
- Type constructor name
- Polymorphic type variables
- References of the constructor
- And some way to say "this is a constructor", so we know it's know a value/type/module
Go to definition should bring the cursor to the first Foo.
Go to type definition should bring the cursor to t.