[GHC] #5218: Add unpackCStringLen# to create Strings from string literals
GHC
ghc-devs at haskell.org
Tue Aug 2 08:25:25 UTC 2016
#5218: Add unpackCStringLen# to create Strings from string literals
-------------------------------------+-------------------------------------
Reporter: tibbe | Owner: thoughtpolice
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.0.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: #5877 #10064 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by jscholl):
Wouldn't that generate something like {{{unpackCString# (# 3#, "abc"#
#)}}} for {{{"abc"}}}? And if I just typed "abc" in ghci, wouldn't it fail
as ghci can not handle unboxed tuples? Beside from that, it should work,
but then I could also just try to change {{{unpackCString#}}} to have type
{{{Addr# -> Int# -> [Char]}}}, avoiding the tuple. This would of course
break backwards compatibility, as would an unboxed tuple, and I wanted to
see if I could avoid that.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5218#comment:43>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list