Fix #507
This commit is contained in:
parent
1a53582a21
commit
6e28e07ca9
@ -43,7 +43,8 @@ import Language.Haskell.GhcMod.Utils
|
||||
import Data.Maybe
|
||||
import Data.Monoid as Monoid
|
||||
import Data.Either
|
||||
import Data.Foldable as Foldable (foldrM, concat)
|
||||
import Data.Foldable as Foldable (foldrM)
|
||||
import qualified Data.Foldable as Foldable
|
||||
import Data.Traversable hiding (mapM, forM)
|
||||
import Data.IORef
|
||||
import Data.List
|
||||
@ -435,6 +436,7 @@ loadTargets filesOrModules = do
|
||||
where
|
||||
loadTargets' Simple = do
|
||||
void $ load LoadAllTargets
|
||||
mapM_ (parseModule >=> typecheckModule >=> desugarModule) =<< getModuleGraph
|
||||
|
||||
loadTargets' Intelligent = do
|
||||
df <- getSessionDynFlags
|
||||
|
@ -56,4 +56,4 @@ spec = do
|
||||
it "emits warnings generated in GHC's desugar stage" $ do
|
||||
withDirectory_ "test/data/check-missing-warnings" $ do
|
||||
res <- runD $ checkSyntax ["DesugarWarnings.hs"]
|
||||
res `shouldBe` "test/data/check-missing-warnings/DesugarWarnings.hs:5:9:Warning: Pattern match(es) are non-exhaustiveIn a case alternative: Patterns not matched: _ : _"
|
||||
res `shouldBe` "DesugarWarnings.hs:4:9:Warning: Pattern match(es) are non-exhaustive\NULIn a case alternative: Patterns not matched: _ : _\n"
|
||||
|
Loading…
Reference in New Issue
Block a user