Open mgsloan opened 6 years ago
Hi, I use Stack's script feature a lot myself and I'd like to fix this as my first Stack issue.
I'd start by changing the error message in https://github.com/commercialhaskell/stack/blob/master/src/Stack/Script.hs#L58. In order to do that, I'd change the exception type in https://github.com/commercialhaskell/stack/blob/master/src/Stack/Script.hs#L49 to something like:
AmbiguousModuleName ModuleName [PackageName] [PackageName]
where the newly introduced field contains the name of inferred packages.
Does this seem reasonable?
Current error message if you run
stack script
on a file withimport Text.Mustache
isIdeally this should give the following info:
--package
arguments for the other packages. This way, if the user needs to switch to using--package
arguments, they can just copy the ones that have been inferred and then add the disambiguating one.