mirror of
https://github.com/ilyakooo0/intellij-haskell.git
synced 2024-09-11 14:56:19 +03:00
Check if module name can be found in file.
This commit is contained in:
parent
3b14e02304
commit
8cef526c94
@ -172,7 +172,10 @@ private[component] object DefinitionLocationComponent {
|
||||
findInfoResult match {
|
||||
case Right(nes) =>
|
||||
nes.headOption match {
|
||||
case Some(r) => Right(PackageModuleLocation(HaskellPsiUtil.findModuleName(r.getContainingFile).get, r, name, Some(qName1)))
|
||||
case Some(r) => HaskellPsiUtil.findModuleName(r.getContainingFile) match {
|
||||
case Some(mn) => Right(PackageModuleLocation(mn, r, name, Some(qName1)))
|
||||
case None => Right(LocalModuleLocation(r.getContainingFile, r, name, Some(qName1)))
|
||||
}
|
||||
case None => Left(NoInfoAvailable(name, psiFile.getName))
|
||||
}
|
||||
case Left(noInfo) => Left(noInfo)
|
||||
|
Loading…
Reference in New Issue
Block a user