Skip to content
Snippets Groups Projects
Commit 2bf4af5e authored by judah's avatar judah
Browse files

Fix #56: Always set POSIX terminal attributes.

parent 144a1945
No related branches found
No related tags found
No related merge requests found
......@@ -293,9 +293,6 @@ wrapRunTerm wrap tops = tops {runTerm = \getE -> wrap (runTerm tops getE)
}
bracketSet :: (Eq a, MonadException m) => IO a -> (a -> IO ()) -> a -> m b -> m b
bracketSet getState set newState f = do
oldState <- liftIO getState
if oldState == newState
then f
else finally (liftIO (set newState) >> f) (liftIO (set oldState))
bracketSet getState set newState f = bracket (liftIO getState)
(liftIO . set)
(\_ -> liftIO (set newState) >> f)
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