Skip to content

Commit b172d63

Browse files
committed
docs/changes: minor cleanups and improvements.
1 parent 796068a commit b172d63

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

docs/changes.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Apply the following changes to code written against Amaranth 0.3 to migrate it t
2626
* Update shell environment to use ``AMARANTH_*`` environment variables instead of ``NMIGEN_*`` environment variables.
2727
* Update shell environment to use ``AMARANTH_ENV_<TOOLCHAIN>`` (with all-uppercase ``<TOOLCHAIN>`` name) environment variable names instead of ``AMARANTH_ENV_<Toolchain>`` or ``NMIGEN_ENV_<Toolchain>`` (with mixed-case ``<Toolchain>`` name).
2828
* Update imports of the form ``from amaranth.vendor.some_vendor import SomeVendorPlatform`` to ``from amaranth.vendor import SomeVendorPlatform``. This change will reduce future churn.
29+
* Replace uses of ``Const.normalize(value, shape)`` with ``Const(value, shape).value``.
30+
* Replace uses of ``Repl(value, count)`` with ``value.replicate(count)``.
2931

3032
While code that uses the features listed as deprecated below will work in Amaranth 0.4, they will be removed in the next version.
3133

@@ -39,8 +41,6 @@ Implemented RFCs
3941
.. _RFC 6: https://amaranth-lang.org/rfcs/0006-stdlib-crc.html
4042
.. _RFC 8: https://amaranth-lang.org/rfcs/0008-aggregate-extensibility.html
4143
.. _RFC 9: https://amaranth-lang.org/rfcs/0009-const-init-shape-castable.html
42-
.. _RFC 8: https://amaranth-lang.org/rfcs/0008-aggregate-extensibility.html
43-
.. _RFC 9: https://amaranth-lang.org/rfcs/0009-const-init-shape-castable.html
4444
.. _RFC 10: https://amaranth-lang.org/rfcs/0010-move-repl-to-value.html
4545
.. _RFC 15: https://amaranth-lang.org/rfcs/0015-lifting-shape-castables.html
4646
.. _RFC 18: https://amaranth-lang.org/rfcs/0018-reorganize-vendor-platforms.html
@@ -53,8 +53,6 @@ Implemented RFCs
5353
* `RFC 6`_: CRC generator
5454
* `RFC 8`_: Aggregate extensibility
5555
* `RFC 9`_: Constant initialization for shape-castable objects
56-
* `RFC 8`_: Aggregate extensibility
57-
* `RFC 9`_: Constant initialization for shape-castable objects
5856
* `RFC 10`_: Move ``Repl`` to ``Value.replicate``
5957
* `RFC 18`_: Reorganize vendor platforms
6058
* `RFC 15`_: Lifting shape-castable objects
@@ -76,7 +74,7 @@ Language changes
7674
* Changed: :meth:`Value.cast` treats instances of classes derived from both :class:`enum.Enum` and :class:`int` (including :class:`enum.IntEnum`) as enumerations rather than integers.
7775
* Changed: :meth:`Value.matches` with an empty list of patterns returns ``Const(1)`` rather than ``Const(0)``, to match the behavior of ``with m.Case():``.
7876
* Changed: :class:`Cat` warns if an enumeration without an explicitly specified shape is used. (`RFC 3`_)
79-
* Deprecated: :meth:`Const.normalize`. (`RFC 5`_)
77+
* Deprecated: :meth:`Const.normalize`; use ``Const(value, shape).value`` instead of ``Const.normalize(value, shape)``. (`RFC 5`_)
8078
* Deprecated: :class:`Repl`; use :meth:`Value.replicate` instead. (`RFC 10`_)
8179
* Removed: (deprecated in 0.1) casting of :class:`Shape` to and from a ``(width, signed)`` tuple.
8280
* Removed: (deprecated in 0.3) :class:`ast.UserValue`.

0 commit comments

Comments
 (0)