Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Commit

Permalink
Use argsVerbose to determine log level in test mode (#717)
Browse files Browse the repository at this point in the history
  • Loading branch information
zliu41 authored Sep 2, 2020
1 parent 9f1f554 commit 271c6e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ main = do
putStrLn "\nStep 3/4: Initializing the IDE"
vfs <- makeVFSHandle
debouncer <- newAsyncDebouncer
let dummyWithProg _ _ f = f (const (pure ()))
let logLevel = if argsVerbose then minBound else Info
dummyWithProg _ _ f = f (const (pure ()))
sessionLoader <- loadSession dir
ide <- initialise def mainRule (pure $ IdInt 0) (showEvent lock) dummyWithProg (const (const id)) (logger minBound) debouncer (defaultIdeOptions sessionLoader) vfs
ide <- initialise def mainRule (pure $ IdInt 0) (showEvent lock) dummyWithProg (const (const id)) (logger logLevel) debouncer (defaultIdeOptions sessionLoader) vfs

putStrLn "\nStep 4/4: Type checking the files"
setFilesOfInterest ide $ HashSet.fromList $ map toNormalizedFilePath' files
Expand Down Expand Up @@ -169,4 +170,3 @@ showEvent _ (EventFileDiagnostics _ []) = return ()
showEvent lock (EventFileDiagnostics (toNormalizedFilePath' -> file) diags) =
withLock lock $ T.putStrLn $ showDiagnosticsColored $ map (file,ShowDiag,) diags
showEvent lock e = withLock lock $ print e

0 comments on commit 271c6e0

Please sign in to comment.