protected boolean setupConfigurationFromContext(HaskellRunConfiguration configuration, ConfigurationContext context, Ref<PsiElement> sourceElement) {
PsiElement psiElement = sourceElement.get();
PsiFile file = psiElement.getContainingFile();
if (!(file instanceof HaskellFile))
return false;
HaskellFile hsFile = (HaskellFile) file;
try {
VirtualFile virtualFile = file.getVirtualFile();
if (virtualFile == null)
return false;
if (!hasMain(virtualFile, context.getModule()))