[input-output-hk/cardano-sl] Remove field accessors from `KeygenCommand` data type (#2874)

parsonsmatt commented on this pull request.

> data KeygenCommand
= RearrangeMask FilePath
| GenerateKey FilePath
| GenerateVss FilePath
| ReadKey FilePath
| DumpAvvmSeeds DumpAvvmSeedsOptions
| GenerateKeysBySpec GenKeysOptions
— | DumpGenesisData { dgdPath :: !FilePath
— , dgdCanonical :: !Bool }
+ | DumpGenesisData DgdPath DgdCanonical

Yes, that’s true :) The primary advantage of a `newtype` here is that you can provide some additional meaning to the type, track provenance, not use it incorrectly, etc. For this, it is likely of small benefit.

Добавить комментарий