unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.81k stars 271 forks source link

ambiguous definition message not giving enough suffix to disambiguate suggestions #5359

Open aryairani opened 2 months ago

aryairani commented 2 months ago

Describe and demonstrate the bug

Code in the scratch file references Cloud.run.withConfig. UCM thinks it's ambiguous, but the suggested names it offers are even more ambiguous. withConfig isn't defined in the scratch file, but is defined in multiple indirect dependencies.

  I couldn't figure out what Cloud.run.withConfig refers to here:

      9 | testMonotonicStaging = do Cloud.run.withConfig staging do submit default() do

  The name Cloud.run.withConfig is ambiguous. Its type should be: i -> (Unit ->{𝕖,
  Exception, Cloud} Text) -> Text

  I found some terms in scope that have matching names and types. Maybe you meant one
  of these:

  withConfig : ClientConfig -> (Unit ->{g, Cloud} a) ->{g, IO} a
  withConfig : ClientConfig -> (Unit ->{g, Cloud} a) ->{g, IO} a
  withConfig : ClientConfig -> (Unit ->{g, Cloud} a) ->{g, IO} a

Screenshots

Environment (please complete the following information):

Additional context Add any other context about the problem here.

aryairani commented 2 months ago

possibly related to https://github.com/unisonweb/unison/issues/5357