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

GHC cvs-ghc at haskell.org
Tue Jun 14 15:43:23 CEST 2011


#5218: Add unpackCStringLen# to create Strings from string literals
---------------------------------+------------------------------------------
    Reporter:  tibbe             |        Owner:              
        Type:  feature request   |       Status:  new         
    Priority:  high              |    Milestone:  7.4.1       
   Component:  Compiler          |      Version:  7.0.3       
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by duncan):

 Solution 2 looks good to me.

 As tibbe says, solution 1 would also be useful in other use cases. Hex,
 octal or bit string literals.

 And if we ever switch `Text` to use UTF8 then `unpackCStringUtf8Len#`
 would be useful there too.

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



More information about the Glasgow-haskell-bugs mailing list