Skip to content
Snippets Groups Projects
Commit d5448938 authored by chrg's avatar chrg
Browse files

Small changes

parent 686e8918
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,14 @@ run = do
, value Exp
]
verbose <-
flag False True $
fold
[ long "verbose"
, short 'v'
, help "log more"
]
checkmode <-
flag False True $
fold
......@@ -137,7 +145,11 @@ run = do
<> fmtMessage m
)
usingLoggerT (filterBySeverity Info msgSeverity $ cmapM fmt logTextStderr) do
let logger =
filterBySeverity (if verbose then Debug else Info) msgSeverity $
cmapM fmt logTextStderr
usingLoggerT logger do
counter <- liftIO (newIORef (0 :: Int))
let
......@@ -157,11 +169,11 @@ run = do
removeFile (f <.> "bak")
liftIO exitFailure
check
:: FilePath
-> [RPath.AnnotatedChoice (String, C.Position)]
-> C.CTranslationUnit C.NodeInfo
-> LoggerT (Msg Severity) IO Bool
check ::
FilePath ->
[RPath.AnnotatedChoice (String, C.Position)] ->
C.CTranslationUnit C.NodeInfo ->
LoggerT (Msg Severity) IO Bool
check f l c = process D "Checking predictate" do
let xs = NE.nonEmpty (filter ((RPath.Yes ==) . RPath.choice) l)
let decided = length l - RPath.numberOfUndecided l
......@@ -241,7 +253,7 @@ run = do
unless t do
logError "file did not satisfy predicate"
cleanup file
liftIO exitFailure
when checkmode do
logInfo "In checking mode, stopping now"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment