IntersectMBO / cardano-api

Cardano API
Apache License 2.0
22 stars 20 forks source link

Remove CPP extension from `Cardano.Api.Fees`. Use `IsList(toList,fromList)` instead of specialised functions. #603

Closed carbolymer closed 1 month ago

carbolymer commented 1 month ago

Changelog

- description: |
    Remove CPP extension from Cardano.Api.Fees and reformat
    Use `IsList(toList,fromList)` instead of specialised functions
# 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

This PR can be reviewed on commit-by-commit basis.

Removed CPP extension from Cardano.Api.Fees on redundant pattern matching.

Replaced specialized toList and fromList with IsList(toList, fromList) functions. This reduces mental overhead when writing code - you don't have to wonder which collection are you converting to/from anymore.

Checklist

carbolymer commented 1 month ago

Force merging, since merge queue didn't report status checks.