summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-12-15 11:21:06 -0500
committerBen Gamari <ben@smart-cactus.org>2020-12-15 11:21:06 -0500
commit331f556886e611af3d2633d1cebb868574a2aa13 (patch)
treecc38fae1d51227ca86677435aaee311c2e6bbbe0 /docs
parent535dae66271af0ce4ab9c0a772614b700bc4c92a (diff)
downloadhaskell-331f556886e611af3d2633d1cebb868574a2aa13.tar.gz
Revert "Implement BoxedRep proposal"
This was inadvertently merged. This reverts commit 6c2eb2232b39ff4720fda0a4a009fb6afbc9dcea.
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/9.2.1-notes.rst6
-rw-r--r--docs/users_guide/exts/levity_polymorphism.rst20
-rw-r--r--docs/users_guide/exts/typed_holes.rst2
3 files changed, 9 insertions, 19 deletions
diff --git a/docs/users_guide/9.2.1-notes.rst b/docs/users_guide/9.2.1-notes.rst
index bfa8283092..283615b7a4 100644
--- a/docs/users_guide/9.2.1-notes.rst
+++ b/docs/users_guide/9.2.1-notes.rst
@@ -13,12 +13,6 @@ Language
<https://www.microsoft.com/en-us/research/publication/a-quick-look-at-impredicativity/>`__
(Serrano et al, ICFP 2020). More information here: :ref:`impredicative-polymorphism`.
This replaces the old (undefined, flaky) behaviour of the :extension:`ImpredicativeTypes` extension.
-* The first stage of the `Pointer Rep Proposal`_ has been implemented. All
- boxed types, both lifted and unlifted, now have representation kinds of
- the shape ``BoxedRep r``. Code that references ``LiftedRep`` and ``UnliftedRep``
- will need to be updated.
-
-.. _Pointer Rep Proposal: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0203-pointer-rep.rst
* Kind inference for data/newtype instance declarations is slightly
more restrictive than before. See the user manual :ref:`kind-inference-data-family-instances`.
diff --git a/docs/users_guide/exts/levity_polymorphism.rst b/docs/users_guide/exts/levity_polymorphism.rst
index 80a544e54b..a65f878b41 100644
--- a/docs/users_guide/exts/levity_polymorphism.rst
+++ b/docs/users_guide/exts/levity_polymorphism.rst
@@ -13,25 +13,21 @@ Here are the key definitions, all available from ``GHC.Exts``: ::
TYPE :: RuntimeRep -> Type -- highly magical, built into GHC
- data Levity = Lifted -- for things like `Int`
- | Unlifted -- for things like `Array#`
-
- data RuntimeRep = BoxedRep Levity -- for anything represented by a GC-managed pointer
- | IntRep -- for `Int#`
+ data RuntimeRep = LiftedRep -- for things like `Int`
+ | UnliftedRep -- for things like `Array#`
+ | IntRep -- for `Int#`
| TupleRep [RuntimeRep] -- unboxed tuples, indexed by the representations of the elements
| SumRep [RuntimeRep] -- unboxed sums, indexed by the representations of the disjuncts
| ...
- type LiftedRep = BoxedRep Lifted
-
type Type = TYPE LiftedRep -- Type is just an ordinary type synonym
The idea is that we have a new fundamental type constant ``TYPE``, which
is parameterised by a ``RuntimeRep``. We thus get ``Int# :: TYPE 'IntRep``
-and ``Bool :: TYPE LiftedRep``. Anything with a type of the form
+and ``Bool :: TYPE 'LiftedRep``. Anything with a type of the form
``TYPE x`` can appear to either side of a function arrow ``->``. We can
thus say that ``->`` has type
-``TYPE r1 -> TYPE r2 -> TYPE LiftedRep``. The result is always lifted
+``TYPE r1 -> TYPE r2 -> TYPE 'LiftedRep``. The result is always lifted
because all functions are lifted in GHC.
.. _levity-polymorphic-restrictions:
@@ -106,13 +102,13 @@ Printing levity-polymorphic types
:category: verbosity
Print ``RuntimeRep`` parameters as they appear; otherwise, they are
- defaulted to ``LiftedRep``.
+ defaulted to ``'LiftedRep``.
Most GHC users will not need to worry about levity polymorphism
or unboxed types. For these users, seeing the levity polymorphism
in the type of ``$`` is unhelpful. And thus, by default, it is suppressed,
-by supposing all type variables of type ``RuntimeRep`` to be ``LiftedRep``
-when printing, and printing ``TYPE LiftedRep`` as ``Type`` (or ``*`` when
+by supposing all type variables of type ``RuntimeRep`` to be ``'LiftedRep``
+when printing, and printing ``TYPE 'LiftedRep`` as ``Type`` (or ``*`` when
:extension:`StarIsType` is on).
Should you wish to see levity polymorphism in your types, enable
diff --git a/docs/users_guide/exts/typed_holes.rst b/docs/users_guide/exts/typed_holes.rst
index 4fded59ae2..170824ee4f 100644
--- a/docs/users_guide/exts/typed_holes.rst
+++ b/docs/users_guide/exts/typed_holes.rst
@@ -443,7 +443,7 @@ it will additionally offer up a list of refinement hole fits, in this case: ::
with const @Integer @[Integer]
where const :: forall a b. a -> b -> a
($) (_ :: [Integer] -> Integer)
- with ($) @GHC.Types.LiftedRep @[Integer] @Integer
+ with ($) @'GHC.Types.LiftedRep @[Integer] @Integer
where ($) :: forall a b. (a -> b) -> a -> b
fail (_ :: String)
with fail @((->) [Integer]) @Integer