-
Duncan Coutts authored
This will be used for the new "cabal build [target]" feature and similarly for "cabal repl [target]". That is we can actually specify what we want to build, like a proper build system. Targets can be components, modules or files. We go to some effort to allow targets to be specified in a short convenient form. We allow case insensitive matching. We only complain when the given form is ambiguous (and note that we don't let the case insensitive matching add artificial ambiguity). If it is ambiguous we report the non-ambigious qualified forms of the targets it could be, e.g.: Ambiguous build target 'darcs'. It could be: exe:darcs (component) lib:darcs (component) We note the kind of target here (component, module, file) since it's possible to have ambiguities between them, like a component called 'Foo' and a module 'Foo' if the user entered 'foo'.
6b26957f