Commit adc52bc8 authored by Matthew Pickering's avatar Matthew Pickering Committed by Marge Bot

Make updTcRef force the result

This can lead to a classic thunk build-up in a TcRef

Fixes #19596
parent 352a463b
......@@ -695,8 +695,7 @@ writeTcRef = writeMutVar
updTcRef :: TcRef a -> (a -> a) -> TcRnIf gbl lcl ()
-- Returns ()
updTcRef ref fn = liftIO $ do { old <- readIORef ref
; writeIORef ref (fn old) }
updTcRef ref fn = liftIO $ modifyIORef' ref fn
{-
************************************************************************
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment