Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
curry
curry-frontend
Commits
5e92b361
Commit
5e92b361
authored
Apr 22, 2014
by
Björn Peemöller
Browse files
Flush output after each message
parent
63247238
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Base/Messages.hs
View file @
5e92b361
...
...
@@ -13,7 +13,7 @@ import Control.Monad (unless, when)
import
Control.Monad.IO.Class
import
Control.Monad.Trans.Either
import
Data.List
(
sort
)
import
System.IO
(
hPutStrLn
,
stderr
)
import
System.IO
(
hFlush
,
hPutStrLn
,
stderr
,
stdout
)
import
System.Exit
(
exitFailure
)
import
Curry.Base.Message
hiding
(
warn
)
...
...
@@ -45,11 +45,11 @@ warn opts msgs = when (wnWarn opts && not (null msgs)) $ do
-- |Print a message on 'stdout'
putMsg
::
MonadIO
m
=>
String
->
m
()
putMsg
=
liftIO
.
putStrLn
putMsg
msg
=
liftIO
(
putStrLn
msg
>>
hFlush
stdout
)
-- |Print an error message on 'stderr'
putErrLn
::
MonadIO
m
=>
String
->
m
()
putErrLn
=
liftIO
.
hPutStrLn
stderr
putErrLn
msg
=
liftIO
(
hPutStrLn
stderr
msg
>>
hFlush
stderr
)
-- |Print a list of error messages on 'stderr'
putErrsLn
::
MonadIO
m
=>
[
String
]
->
m
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment