hlint hack.
This commit is contained in:
parent
4911db0a7a
commit
0c76a801f6
@ -32,6 +32,7 @@ import qualified Data.Map.Strict as M
|
|||||||
import Data.Map (Map)
|
import Data.Map (Map)
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
#endif
|
#endif
|
||||||
|
import Data.Maybe (fromMaybe)
|
||||||
import Data.Set (Set)
|
import Data.Set (Set)
|
||||||
import qualified Data.Set as S
|
import qualified Data.Set as S
|
||||||
import qualified Exception as GE
|
import qualified Exception as GE
|
||||||
@ -93,7 +94,7 @@ setupDB cradle mlibdir opt mvar = E.handle handler $ do
|
|||||||
|
|
||||||
loop :: Set FilePath -> LineSeparator -> MVar DB -> Logger -> Ghc ()
|
loop :: Set FilePath -> LineSeparator -> MVar DB -> Logger -> Ghc ()
|
||||||
loop set ls mvar readLog = do
|
loop set ls mvar readLog = do
|
||||||
cmdArg <- liftIO $ getLine
|
cmdArg <- liftIO getLine
|
||||||
let (cmd,arg') = break (== ' ') cmdArg
|
let (cmd,arg') = break (== ' ') cmdArg
|
||||||
arg = dropWhile (== ' ') arg'
|
arg = dropWhile (== ' ') arg'
|
||||||
(msgs,ok,set') <- case cmd of
|
(msgs,ok,set') <- case cmd of
|
||||||
@ -119,7 +120,7 @@ checkStx set ls readLog file = do
|
|||||||
mdel <- removeMainTarget
|
mdel <- removeMainTarget
|
||||||
when add $ addTargetFiles [file]
|
when add $ addTargetFiles [file]
|
||||||
void $ G.load LoadAllTargets
|
void $ G.load LoadAllTargets
|
||||||
msgs <- liftIO $ readLog
|
msgs <- liftIO readLog
|
||||||
let set1 = if add then S.insert file set else set
|
let set1 = if add then S.insert file set else set
|
||||||
set2 = case mdel of
|
set2 = case mdel of
|
||||||
Nothing -> set1
|
Nothing -> set1
|
||||||
@ -148,9 +149,7 @@ findSym :: Set FilePath -> MVar DB -> String
|
|||||||
-> Ghc ([String], Bool, Set FilePath)
|
-> Ghc ([String], Bool, Set FilePath)
|
||||||
findSym set mvar sym = do
|
findSym set mvar sym = do
|
||||||
db <- liftIO $ readMVar mvar
|
db <- liftIO $ readMVar mvar
|
||||||
let ret = case M.lookup sym db of
|
let ret = fromMaybe [] (M.lookup sym db)
|
||||||
Nothing -> []
|
|
||||||
Just xs -> xs
|
|
||||||
return (ret, True, set)
|
return (ret, True, set)
|
||||||
|
|
||||||
lintStx :: Set FilePath -> LineSeparator -> FilePath
|
lintStx :: Set FilePath -> LineSeparator -> FilePath
|
||||||
|
Loading…
Reference in New Issue
Block a user