type Foo = MyConstructor Nat
type Bar = MyConstructor Nat
scratch/main> add
The following compiles just fine:
go x =
(Foo.MyConstructor n) = x
n
But if MyConstructor is ambiguous, then we get a cryptic parsing error instead of a message letting us know that MyConstructor is ambiguous.
go x =
(MyConstructor n) = x
n
Output:
scratch/main> builtins.merge
Done.
type Foo = MyConstructor Nat
type Bar = MyConstructor Nat
Loading changes detected in scratch.u.
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
type Bar
type Foo
scratch/main> add
⍟ I've added these definitions:
type Bar
type Foo
The following compiles just fine:
go x =
(Foo.MyConstructor n) = x
n
Loading changes detected in scratch.u.
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
go : Foo -> Nat
But if MyConstructor is ambiguous, then we get a cryptic parsing error instead of a message letting us know that MyConstructor is ambiguous.
go x =
(MyConstructor n) = x
n
Loading changes detected in scratch.u.
I got confused here:
2 | (MyConstructor n) = x
I was surprised to find a = here.
I was expecting one of these instead:
* and
* bang
* do
* false
* force
* handle
* if
* infixApp
* let
* newline or semicolon
* or
* quote
* termLink
* true
* tuple
* typeLink
🛑
The transcript failed due to an error in the stanza above. The error is:
I got confused here:
2 | (MyConstructor n) = x
I was surprised to find a = here.
I was expecting one of these instead:
and
bang
do
false
force
handle
if
infixApp
let
newline or semicolon
or
quote
termLink
true
tuple
typeLink
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
ucm --version release/0.5.25 (built on 2024-07-22)
Describe and demonstrate the bug
Input:
The following compiles just fine:
But if
MyConstructor
is ambiguous, then we get a cryptic parsing error instead of a message letting us know thatMyConstructor
is ambiguous.The following compiles just fine:
But if
MyConstructor
is ambiguous, then we get a cryptic parsing error instead of a message letting us know thatMyConstructor
is ambiguous.🛑
The transcript failed due to an error in the stanza above. The error is:
I got confused here:
I was surprised to find a = here. I was expecting one of these instead:
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
ucm --version
release/0.5.25 (built on 2024-07-22)