Closed HeinrichApfelmus closed 5 months ago
This pull requests starts the simplification of the Cardano.Wallet.Read.* hierarchy where the EraFun f g is removed in favor of a plain function type
Cardano.Wallet.Read.*
EraFun f g
foo :: forall era. IsEra era => f era → g era
In order to start the simplification, we redefine the EraFun type as a newtype
EraFun
-- | Function that maps an era-indexed type. newtype EraFun f g = EraFunCon {runEraFun :: forall era. IsEra era => f era -> g era}
and export both the eliminator runEraFun and the constructor mkEraFun = EraFunCon.
runEraFun
mkEraFun = EraFunCon
By using the eliminator and constructor directly, we can remove most categorical constructions such as
(*.**) (*&&&*) (*****) EraFunK liftK mapOnEraFun CollectTuple
ADP-3319
This pull requests starts the simplification of the
Cardano.Wallet.Read.*
hierarchy where theEraFun f g
is removed in favor of a plain function typeIn order to start the simplification, we redefine the
EraFun
type as a newtypeand export both the eliminator
runEraFun
and the constructormkEraFun = EraFunCon
.By using the eliminator and constructor directly, we can remove most categorical constructions such as
Issue Number
ADP-3319