[GHC] #13174: Fix mismatch between unsafeDupablePerformIO and note
GHC
ghc-devs at haskell.org
Tue Jan 24 02:20:55 UTC 2017
#13174: Fix mismatch between unsafeDupablePerformIO and note
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 8.2.1
Component: Core | Version: 8.1
Libraries |
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
`ghc/libraries/base/GHC/IO/Unsafe.hs` contains the following note:
{{{
-- Note [unsafeDupablePerformIO is NOINLINE]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Why do we NOINLINE unsafeDupablePerformIO? See the comment with
-- GHC.ST.runST. Essentially the issue is that the IO computation
-- inside unsafePerformIO must be atomic: it must either all run, or
-- not at all. If we let the compiler see the application of the IO
-- to realWorld#, it might float out part of the IO.
}}}
However, `unsafeDupablePerformIO` does not actually have a `NOINLINE`
pragma. So either the note is out of date and should be removed/modified,
or someone messed up the code.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13174>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list