Skip to content

Commit

Permalink
Polish docs and error messages
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Lebbing <[email protected]>
  • Loading branch information
2 people authored and martijnbastiaan committed May 29, 2022
1 parent b1f257c commit e2cfe0e
Show file tree
Hide file tree
Showing 17 changed files with 131 additions and 120 deletions.
30 changes: 16 additions & 14 deletions .ci/bindist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,27 @@ triggered on any other branch a _beta_ release gets made.
* `clash-ghc/clash-cores.cabal`
* `.ci/bindist/linux/snap/snap/snapcraft.yaml`
* `docs/conf.py`
2. Change the defaults of cabal flags in `clash-prelude/clash-prelude.cabal`
where necessary. At the time of writing this applies only to
`-fmultiple-hidden`.
3. Update the CHANGELOG (see changelog/README.md).
4. Create a release branch named after the major version of Clash you're trying to
2. Update the CHANGELOG (see changelog/README.md).
3. Create a release branch named after the major version of Clash you're trying to
release. For example, if you're planning on releasing Clash 1.6.0, create a
branch called `1.6`.
5. Ask someone with admin permissions on GitLab to create a new nightly schedule
4. Repeat step (1) in the new release branch.
5. Change the defaults of cabal flags in `clash-prelude/clash-prelude.cabal`
where necessary. At the time of writing this applies only to
`-fmultiple-hidden`.
6. Ask someone with admin permissions on GitLab to create a new nightly schedule
and trigger a test release build on [GitLab CI](https://gitlab.com/clash-lang/clash-compiler/pipeline_schedules).
The new schedule should be the same as the old one, but targeting the new
release branch. Verify that both Snap and Hackage release fine, and preview
their releases.
* [Preview on Hackage](http://hackage.haskell.org/package/clash-prelude/candidates/)
* [Preview on Snap](https://snapcraft.io/clash)
6. Update the [starter projects](https://github.com/clash-lang/stack-templates/)
7. Write release notes for: Twitter, LinkedIn, and clash-lang.org.
8. Create a release on [GitHub's new release page](https://github.com/clash-lang/clash-compiler/releases/new)
9. After the release is on Hackage: run `changelog/comment-gh.py` and execute the commands it lists. This will inform users subscribed to specific issues that a fix for their issue is now in a released version.
10. Update these docs if anything is missing :-)
11. Enjoy!
10. Update the [starter projects](https://github.com/clash-lang/stack-templates/)
11. Update these docs if anything is missing :-)
12. Enjoy!

## Releasing a new version minor version (1.x.x)
1. Change version numbers in:
Expand All @@ -67,14 +68,15 @@ triggered on any other branch a _beta_ release gets made.
* `.ci/bindist/linux/snap/snap/snapcraft.yaml`
* `docs/conf.py`
2. Update the CHANGELOG (see changelog/README.md).
3. Ask someone with admin permissions on GitLab to trigger a nightly scheduele,
3. Ask someone with admin permissions on GitLab to trigger a nightly schedule,
or simply wait a day. Verify that both Snap and Hackage release fine, and
preview heir releases.
* [Preview on Hackage](http://hackage.haskell.org/package/clash-prelude/candidates/)
* [Preview on Snap](https://snapcraft.io/clash)

4. Create a release on [GitHub's new release page](https://github.com/clash-lang/clash-compiler/releases/new)
5. Cherry-pick commit made in (2) to `master`
6. After the release is on Hackage: run `changelog/comment-gh.py` and execute the commands it lists. This will inform users subscribed to specific issues that a fix for their issue is now in a released version.
7. Update these docs if anything is missing :-)
8. Enjoy!
5. Update the [starter projects](https://github.com/clash-lang/stack-templates/)
6. Cherry-pick commit made in (2) to `master`
7. After the release is on Hackage: run `changelog/comment-gh.py` and execute the commands it lists. This will inform users subscribed to specific issues that a fix for their issue is now in a released version.
8. Update these docs if anything is missing :-)
9. Enjoy!
14 changes: 11 additions & 3 deletions HACKING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ provide a complete compiler. Primarily, this consists of
implements the ``clash`` and ``clashi`` executables.

A lot of the code in this library is separated by the version of GHC it works
with. For example, ``src-841`` is specific to GHC 8.4.x.
with. For example, ``src-bin-9.0`` is specific to GHC 9.0.x.

``clash-lib``

Expand All @@ -55,8 +55,8 @@ functionality which is not required, or are not yet production-ready. These are
``clash-cores``

A collection of IP cores for use in Clash designs. Currently, this includes
only Lattice Ice IO cores, and SPI (with slaves implemented with the Lattice
SBIO found on Lattice FPGAs).
Lattice Ice IO cores, SPI (with slaves implemented with the Lattice
SBIO found on Lattice FPGAs), a UART and support for Xilinx floating point IP.

.. note:: This library is optional, and is not required to use Clash. In
the future it may be extended with additional IP cores.
Expand All @@ -74,3 +74,11 @@ functionality which is not required, or are not yet production-ready. These are
A development tool for analysing how the normalizer in ``clash-lib`` affects
the core of a particular design. It allows the result of each different
optimizer pass to be seen for debugging purposes.

``clash-lib-hedgehog``

Hedgehog Generators for ``clash-lib``.

``clash-prelude-hedgehog``

Hedgehog Generators for ``clash-prelude``.
2 changes: 1 addition & 1 deletion STYLE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Indentation
~~~~~~~~~~~

Tabs are illegal. Use spaces for indenting. Indent your code blocks with
*2 spaces*. Indent the ``where`` keyword two spaces to set it apart from
*2 spaces*. Indent the ``where`` keyword 1 space to set it apart from
the rest of the code and indent the definitions in a ``where`` clause 1
space. Some examples:

Expand Down
12 changes: 6 additions & 6 deletions clash-lib/prims/common/GHC_Integer_Type.primitives.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,44 @@
Integer -> Integer -> Integer'
template: ~ARG[0] + ~ARG[1]
warning: 'GHC.Integer.Type.plusInteger: Integers are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
- BlackBox:
name: GHC.Integer.Type.minusInteger
kind: Expression
type: 'minusInteger ::
Integer -> Integer -> Integer'
template: ~ARG[0] - ~ARG[1]
warning: 'GHC.Integer.Type.minusInteger: Integers are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
- BlackBox:
name: GHC.Integer.Type.leInteger
kind: Expression
type: 'leInteger :: Integer
-> Integer -> Bool'
template: ~ARG[0] <= ~ARG[1]
warning: 'GHC.Integer.Type.leInteger: Integers are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
- BlackBox:
name: GHC.Integer.Type.gtInteger
kind: Expression
type: 'gtInteger :: Integer
-> Integer -> Bool'
template: ~ARG[0] > ~ARG[1]
warning: 'GHC.Integer.Type.gtInteger: Integers are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
- BlackBox:
name: GHC.Integer.Type.ltInteger
kind: Expression
type: 'ltInteger :: Integer
-> Integer -> Bool'
template: ~ARG[0] < ~ARG[1]
warning: 'GHC.Integer.Type.ltInteger: Integers are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
- BlackBox:
name: GHC.Integer.Type.geInteger
kind: Expression
type: 'geInteger :: Integer
-> Integer -> Bool'
template: ~ARG[0] >= ~ARG[1]
warning: 'GHC.Integer.Type.geInteger: Integers are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
8 changes: 4 additions & 4 deletions clash-lib/prims/common/GHC_Natural.primitives.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
comment: Needed to make the evaluator handle this constructor strictly
primType: Constructor
warning: 'GHC.Natural.NatS#: Naturals are dynamically sized in simulation, but
fixed-length after synthesization. Use carefully.'
fixed-length after synthesis. Use carefully.'
workInfo: Never
- Primitive:
name: GHC.Natural.naturalToInteger
Expand All @@ -25,18 +25,18 @@
Natural -> Natural -> Natural'
template: ~ARG[0] + ~ARG[1]
warning: 'GHC.Natural.plusNatural: Naturals are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
- BlackBox:
name: GHC.Natural.minusNatural
kind: Expression
type: 'minusNatural ::
Natural -> Natural -> Natural'
template: ~ARG[0] - ~ARG[1]
warning: 'GHC.Natural.minusNatural: Naturals are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
- Primitive:
name: GHC.Natural.gcdNatural
primType: Function
warning: 'GHC.Natural.gcdNatural: Naturals are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
workInfo: Never
18 changes: 9 additions & 9 deletions clash-lib/prims/common/GHC_Num_Integer.primitives.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
comment: Needed to make the evaluator handle this constructor strictly
primType: Constructor
warning: 'GHC.Num.Integer.IS: Integers are dynamically sized in simulation, but
fixed-length after synthesization. Use carefully.'
fixed-length after synthesis. Use carefully.'
workInfo: Never
- Primitive:
name: GHC.Num.Integer.IP
comment: Needed to make the evaluator handle this constructor strictly
primType: Constructor
warning: 'GHC.Num.Integer.IP: Integers are dynamically sized in simulation, but
fixed-length after synthesization. Use carefully.'
fixed-length after synthesis. Use carefully.'
workInfo: Never
- Primitive:
name: GHC.Num.Integer.IN
comment: Needed to make the evaluator handle this constructor strictly
primType: Constructor
warning: 'GHC.Num.Integer.IN: Integers are dynamically sized in simulation, but
fixed-length after synthesization. Use carefully.'
fixed-length after synthesis. Use carefully.'
workInfo: Never
- Primitive:
name: GHC.Num.Integer.integerFromNatural
Expand All @@ -32,44 +32,44 @@
-> Integer -> Integer'
template: ~ARG[0] + ~ARG[1]
warning: 'GHC.Num.Integer.integerAdd: Integers are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
- BlackBox:
name: GHC.Num.Integer.integerSub
kind: Expression
type: 'integerSub :: Integer
-> Integer -> Integer'
template: ~ARG[0] - ~ARG[1]
warning: 'GHC.Num.Integer.integerSub: Integers are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
- BlackBox:
name: GHC.Num.Integer.integerLe
kind: Expression
type: 'integerLe :: Integer
-> Integer -> Bool'
template: ~ARG[0] <= ~ARG[1]
warning: 'GHC.Num.Integer.integerLe: Integers are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
- BlackBox:
name: GHC.Num.Integer.integerGt
kind: Expression
type: 'integerGt :: Integer
-> Integer -> Bool'
template: ~ARG[0] > ~ARG[1]
warning: 'GHC.Num.Integer.integerGt: Integers are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
- BlackBox:
name: GHC.Num.Integer.integerLt
kind: Expression
type: 'integerLt :: Integer
-> Integer -> Bool'
template: ~ARG[0] < ~ARG[1]
warning: 'GHC.Num.Integer.integerLt: Integers are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
- BlackBox:
name: GHC.Num.Integer.integerGe
kind: Expression
type: 'integerGe :: Integer
-> Integer -> Bool'
template: ~ARG[0] >= ~ARG[1]
warning: 'GHC.Num.Integer.integerGe: Integers are dynamically sized in simulation,
but fixed-length after synthesization. Use carefully.'
but fixed-length after synthesis. Use carefully.'
4 changes: 2 additions & 2 deletions clash-lib/prims/common/GHC_Num_Natural.primitives.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
comment: Needed to make the evaluator handle this constructor strictly
primType: Constructor
warning: 'GHC.Num.Natural.NS: Naturals are dynamically sized in simulation, but
fixed-length after synthesization. Use carefully.'
fixed-length after synthesis. Use carefully.'
workInfo: Never
- Primitive:
name: GHC.Num.Natural.NB
comment: Needed to make the evaluator handle this constructor strictly
primType: Constructor
warning: 'GHC.Num.Natural.NB: Naturals are dynamically sized in simulation, but
fixed-length after synthesization. Use carefully.'
fixed-length after synthesis. Use carefully.'
workInfo: Never
- BlackBox:
name: GHC.Num.Natural.naturalAdd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
:: Integer -> Integer -> Int#'
template: ~INCLUDENAME[0](~ARG[0],~ARG[1])
warning: 'GHC.Integer.Logarithms.integerLogBase#: Integers are dynamically sized
in simulation, but fixed-length after synthesization. Use carefully.'
in simulation, but fixed-length after synthesis. Use carefully.'
Loading

0 comments on commit e2cfe0e

Please sign in to comment.