cardano-base
cardano-base copied to clipboard
Defunctionalize `EpochInfo`
trafficstars
Currently EpochInfo is datatype consisting of bunch of closures, parametrized by monad.
Such datatype cannot be prettyprinted, serialized or otherwise inspected both in Haskell or by developer.
Thus some libraries tend to make custom datatypes storing same information.
Yet seems like it is bounded with monad Either Text everythere. And seems like there is only two functions to modify it. Thus it seems like it could be just regular (possibly modulo Era type families) datatype, something like list of epochs.