summaryrefslogtreecommitdiff
path: root/libraries/ghc-prim/GHC/CString.hs
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ghc-prim/GHC/CString.hs')
-rw-r--r--libraries/ghc-prim/GHC/CString.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/libraries/ghc-prim/GHC/CString.hs b/libraries/ghc-prim/GHC/CString.hs
index 1edeecbbfa..680d3c8a39 100644
--- a/libraries/ghc-prim/GHC/CString.hs
+++ b/libraries/ghc-prim/GHC/CString.hs
@@ -135,9 +135,9 @@ Moreover, we want to make it CONLIKE, so that:
All of this goes for unpackCStringUtf8# too.
-}
-{- Note [Inlining of unpackFoldrCString]
+{-
+Note [Inlining of unpackFoldrCString]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
Usually the unpack-list rule turns unpackFoldrCString# into unpackCString#
It also has a BuiltInRule in PrelRules.hs:
unpackFoldrCString# "foo" c (unpackFoldrCString# "baz" c n)
@@ -154,9 +154,8 @@ when looking at nofib.
This is especially important for elem which then results in an
allocation free loop.
- Note [unpackCString# iterating over addr]
+Note [unpackCString# iterating over addr]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
When unpacking unpackCString# and friends repeatedly return a cons cell
containing:
* The current character we just unpacked.
@@ -175,7 +174,6 @@ the string and the current offset, saving a word for each character unpacked.
This has the additional advantage the we can guarantee that only the
increment will happen in the loop.
-
-}
unpackCString# :: Addr# -> [Char]