From f168ac753c4ee61f7585b585480924526204195a Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Fri, 14 Mar 2025 20:58:34 -0400 Subject: [PATCH 1/2] Fix typo in what_makes_fast_hs.rst --- src/Preliminaries/what_makes_fast_hs.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Preliminaries/what_makes_fast_hs.rst b/src/Preliminaries/what_makes_fast_hs.rst index 948a9e2..f173953 100644 --- a/src/Preliminaries/what_makes_fast_hs.rst +++ b/src/Preliminaries/what_makes_fast_hs.rst @@ -222,8 +222,8 @@ of a ``Counter`` data type that tracks some domain specific integer: Normally, when compiling with ``-O2`` GHC will recognize and optimize this definition. ``Int`` is a :term:`Boxed` and :term:`Lifted` type in ``Counter``, this means -that each ``Counter`` holds a pointer to an ``Int`` on the heap *not* a pointer -to an ``Int`` directly. We can instruct GHC remove the heap indirection with the +that each ``Counter`` holds a pointer to an ``Int`` on the heap *not* +an ``Int`` directly. We can instruct GHC remove the heap indirection with the `unpack `_ pragma and a bang pattern: From f3cf031831bd4d2d52961ca2662f7b6c43b814ec Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Fri, 14 Mar 2025 20:59:57 -0400 Subject: [PATCH 2/2] Comma --- src/Preliminaries/what_makes_fast_hs.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Preliminaries/what_makes_fast_hs.rst b/src/Preliminaries/what_makes_fast_hs.rst index f173953..2fdc889 100644 --- a/src/Preliminaries/what_makes_fast_hs.rst +++ b/src/Preliminaries/what_makes_fast_hs.rst @@ -222,7 +222,7 @@ of a ``Counter`` data type that tracks some domain specific integer: Normally, when compiling with ``-O2`` GHC will recognize and optimize this definition. ``Int`` is a :term:`Boxed` and :term:`Lifted` type in ``Counter``, this means -that each ``Counter`` holds a pointer to an ``Int`` on the heap *not* +that each ``Counter`` holds a pointer to an ``Int`` on the heap, *not* an ``Int`` directly. We can instruct GHC remove the heap indirection with the `unpack `_