[GHC] #11772: GHC.CString.unpackCStringUtf8# is inlineable
GHC
ghc-devs at haskell.org
Tue Mar 29 17:53:42 UTC 2016
#11772: GHC.CString.unpackCStringUtf8# is inlineable
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 8.0.1
Component: Core | Version: 7.10.3
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:
-------------------------------------+-------------------------------------
While looking through the logs of a build of a project I have lying
around with a GHC 8.0 snapshot, I noticed that there may still be some
fragile rules in the `text` package (see #11528 for a previous issue).
The problem is that
`GHC.CString.unpackCStringUtf8#` may be inlined, which may preempt the
`TEXT literal UTF8` rule in `Data.Text.Show`. `unpackCStringUtf8#` doesn't
seem like a terribly great candidate for inlining as it produces a list,
{{{#!hs
unpackCStringUtf8# :: Addr# -> [Char]
}}}
Moreover, the other functions in this module along these lines (e.g.
`unpackCString#` are marked `NOINLINE`. Perhaps this should have a
`NOINLINE` pragma as well?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11772>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list