-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Comments
chshersh
added
enhancement
New feature or request
question
Further information is requested
labels
Sep 1, 2022
chshersh
changed the title
Rething 'CliEnvSettings' and 'defaultCliEnvSettings'
Rethink 'CliEnvSettings' and 'defaultCliEnvSettings'
Sep 1, 2022
2 tasks
Okay, I was thinking about the interface and here is the proposed solution:
So, instead of specifying a global list of tools, users can call the app :: App ()
app = Iris.asksCliEnv Iris.cliEnvCmd >>= \case
Download url -> do
need ["curl"]
runDownload URL
Evaluate hs -> do
need ["ghc", "cabal"]
runEvaluate hs |
chshersh
added
good first issue
Good for newcomers
hacktoberfest
https://hacktoberfest.com/
labels
Oct 1, 2022
2 tasks
Is anyone working on this? I can take a look otherwise 😄 |
@german1608 I believe no one is looking (or at least haven't written about this explicitly). So feel free to work on this 🙂 |
Merged
3 tasks
chshersh
added a commit
that referenced
this issue
Jan 16, 2023
…iredTools` from `CliEnvSettings` (#97) Resolves #67 * Remove cmd parameter from Tool and remove cliEnvSettingsRequiredTools from CliEnvSettings * Use MonadIO constraint instead of IO * Fix missing field * include name in customParserSettings * Fix HLint unnecessary $ warning Co-authored-by: Dmitrii Kovanikov <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
good first issue
Good for newcomers
hacktoberfest
https://hacktoberfest.com/
question
Further information is requested
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: