IntersectMBO / cardano-api

Cardano API
Apache License 2.0
22 stars 22 forks source link

Add Classy versions of Era witness functions #537

Closed locallycompact closed 2 months ago

locallycompact commented 4 months ago

Changelog

- description: |
    Add `IsAllegraBasedEra`, `IsAlonzoBasedEra`, `IsBabbageBasedEra`, `IsConwayBasedEra`, `IsMaryBasedEra` type classes.
    Add `ToAlonzoScript` and `HasScriptLanguageInEra` type classes.
# uncomment types applicable to the change:
  type:
  - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - refactoring    # QoL changes
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Additional context for the PR goes here. If the PR fixes a particular issue please provide a link to the issue.

How to trust this PR

Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.

Checklist

smelc commented 4 months ago

cc @newhoggy who is the main author of the era system.

locallycompact commented 3 months ago

Any opinions on this @newhoggy ?

smelc commented 3 months ago

cc @carbolymer

palas commented 2 months ago

FYI: I have rebased your branch because we have done changes to the formatting. I have made a copy of the unrebased branch here: backup/locallycompact/classy

locallycompact commented 2 months ago

@carbolymer Could I get a re-review on this?

smelc commented 2 months ago

Closing as it was duplicated in https://github.com/IntersectMBO/cardano-api/pull/585 (which I can sign, since it's on this repo; instead of a clone).