diff options
author | Simon Marlow <marlowsd@gmail.com> | 2011-08-22 13:56:17 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-08-25 11:12:30 +0100 |
commit | 5b167f5edad7d3268de20452da7af05c38972f7c (patch) | |
tree | 36a14e64b510ede91e4e334f3e44d865321adcde /compiler/utils | |
parent | 3108accd634a521b25471df19f063c2061d6d3ee (diff) | |
download | haskell-5b167f5edad7d3268de20452da7af05c38972f7c.tar.gz |
Snapshot of codegen refactoring to share with simonpj
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/FastString.lhs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs index 35d4387dd3..c37fc26f72 100644 --- a/compiler/utils/FastString.lhs +++ b/compiler/utils/FastString.lhs @@ -434,6 +434,7 @@ unpackFS (FastString _ n_bytes _ buf enc) = ZEncoded -> peekCAStringLen (castPtr ptr,n_bytes) UTF8Encoded _ -> utf8DecodeString ptr n_bytes +-- | Gives the UTF-8 encoded bytes corresponding to a 'FastString' bytesFS :: FastString -> [Word8] bytesFS (FastString _ n_bytes _ buf _) = inlinePerformIO $ withForeignPtr buf $ \ptr -> |