Skip to content

Commit

Permalink
Review: better readability
Browse files Browse the repository at this point in the history
Co-authored-by: Mateusz Galazyn <[email protected]>
  • Loading branch information
carlhammann and carbolymer authored Oct 27, 2023
1 parent 49c71f2 commit 0f3e1cb
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ pUpdateProtocolParametersCmd =
-- | Cost models only makes sense in eras from Alonzo onwards. For earlier
-- eras, this parser doesn't show up in the command line and returns 'Nothing'.
pCostModelsFile :: ShelleyBasedEra era -> Parser (Maybe (Cmd.CostModelsFile era))
pCostModelsFile =
caseShelleyToMaryOrAlonzoEraOnwards
(const $ pure Nothing)
(\alonzoOnwards -> fmap (fmap $ Cmd.CostModelsFile alonzoOnwards . File) . optional $ pCostModels (Just "new"))
pCostModelsFile sbe =
forEraInEon sbe (pure Nothing) $ \alonzoOnwards -> do
file <- optional $ pCostModels (Just "new")
pure $ Cmd.CostModelsFile alonzoOnwards . File <$> file

pGovernanceActionProtocolParametersUpdateCmd :: ()
=> CardanoEra era
Expand Down

0 comments on commit 0f3e1cb

Please sign in to comment.