Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GHC2021, ImportQualifiedPost & updated copyright files #62

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

coot
Copy link
Collaborator

@coot coot commented Sep 25, 2024

Depends on #61.

  • Use GHC2021
  • Use ImportQualifiedPost which is part of GHC2024
  • Updated copyright and NOTICE files
Language GHC Support
GHC2024 >= 9.10
GHC2021 >= 9.2
  • switch to GHC2021.
  • wait for cardano-node to be build with GHC >= 9.2.

This removes the need to pass it in messages, like we used to in
`MsgResp` in `typed-protocols-examples`.

The `Driver` and `Codec` were modified:
* `encode` and `sendMessage` receive the initial state of the protocol
  state transition imposed by a message, which is dual to
* `decode` and `recvMessage` receive the final state of the protocol
  state transition imposed by a message

This is seems more natural than always passing the final state.

The drawback of this systemic approach is that every `Yield` needs
access to both initial and final state of a transition.  In previous
approach one had more control over which messages require access to the
initial state (e.g. `MsgRecv` in `Stateful.ReqResp`) - although it was
looking more like a hack since that part of a message wasn't sent over
the wire.
Also done for typed-protocols-stateful-codec.
Also use `cabal-version: 3.4` in all packages.
@coot coot marked this pull request as draft September 25, 2024 17:09
The goal was to use GHC2024, but that's only supported by `GHC >= 9.10`.
Required extensions which are part of GHC2024 are added to
`default-extensions`.
@coot coot self-assigned this Sep 25, 2024
@coot coot changed the title Use GHC2024, ImportQualifiedPost & updated copyright files Use GHC2021, ImportQualifiedPost & updated copyright files Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant