The stack uses component search , for example
stack build packagename:component-type:component-name
So, if your package is called "foo" and your executable is called "bar", you can use
stack build foo:exe:bar
However, if the component name is unique, you can remove the package name and component type. Therefore, if your executable is called "exectuable-name", it
stack build :executable-name