Rethink 'CliEnvSettings' and 'defaultCliEnvSettings' #67
Labels
enhancement
New feature or request
good first issue
Good for newcomers
hacktoberfest
https://hacktoberfest.com/
question
Further information is requested
Milestone
Currently, the
CliEnvSettings
data type is defined in the following way:iris/src/Iris/Env.hs
Lines 53 to 71 in 0b9c50d
And
defaultCliEnvSettings
:iris/src/Iris/Env.hs
Lines 78 to 86 in 0b9c50d
The idea of using
()
in the type signature was to rely on type-changing record updates. Unfortunately, the following code doesn't compile:It fails with the error:
The problem here because the
cliEnvSettingsRequiredTools
is also parametrised bycmd
. So to change the type, you need to update both fields like this:Which is a shame. You need to set an extra field you don't care about all the time because you want to change the type of the CLI command.
It would be great to improve this interface. However, I don't have ideas at the moment. This requires some thinking 🤔
The text was updated successfully, but these errors were encountered: