[GHC] #5218: Add unpackCStringLen# to create Strings from string literals

GHC ghc-devs at haskell.org
Sat Aug 19 01:13:17 UTC 2017


#5218: Add unpackCStringLen# to create Strings from string literals
-------------------------------------+-------------------------------------
        Reporter:  tibbe             |                Owner:  thoughtpolice
            Type:  feature request   |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.0.3
      Resolution:                    |             Keywords:  strings
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):  Phab:D2443
  #11312, #9719                      |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by winter):

 @simonpj let say we fixed `B#` to `ByteArray#` , people still want to ask
 compiler turn literal into `ByteArray#` in different ways, maybe ASCII
 with overflow warning , maybe standard utf8. The point is we can't fix how
 compiler compile literal into `B#` or whatever primitive we choose.I fail
 to see how above "Core" section mention that. And I really don't think the
 problem laid in a universal `B#` selection: I just the ability to choose
 between `Addr#` or `ByteArray#' or `(# Int#, Addr# #)`.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5218#comment:90>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list