We currently read extensions from LANGUAGE pragmas at the top of Haskell files but when provided with non-stdin targets we should also attempt to read package-wide extensions from appropriate .cabal files.
If a target points to the top of a project then we should be able to find any identify .cabal files easily but we may also want to look upwards from the target directory to find the project root in the case where someone has used a specific file or subset of files as a target.
We currently read extensions from LANGUAGE pragmas at the top of Haskell files but when provided with non-stdin targets we should also attempt to read package-wide extensions from appropriate .cabal files.
If a target points to the top of a project then we should be able to find any identify .cabal files easily but we may also want to look upwards from the target directory to find the project root in the case where someone has used a specific file or subset of files as a target.