You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
robot-name practice exercise: Consider adding random to dependencies, to avoid "Could not load module ‘System.Random’ / It is a member of the hidden package ‘random-1.1’."
#1042
Open
petertseng opened this issue
Jan 25, 2022
· 0 comments
If the student submits a solution using System.Random but not package.yaml, the error would be:
Could not load module ‘System.Random’
It is a member of the hidden package ‘random-1.1’.
Perhaps you need to add ‘random’ to the build-depends in your .cabal file.
There are a few possibilities:
We could expect that the student should submit the package.yaml that includes random under dependencies, just like how we expect that if students use any dependencies they submit package.yaml. This is the status quo. If this is the decision, the action is to close this issue and do nothing more.
If you are viewing this issue and are unsure what decision to make, be assured that you have my support if you choose to make a PR that implements the latter, and that the latter is my current recommendation.
Perhaps there should be some exercise where we explicitly teach students about the necessity of submitting package.yaml when using packages, but that is sounding like a concept exercise to me.
The text was updated successfully, but these errors were encountered:
petertseng
changed the title
robot-name practice exercise: Consider adding random to dependenciesrobot-name practice exercise: Consider adding random to dependencies, to avoid "Could not load module ‘System.Random’ / It is a member of the hidden package ‘random-1.1’."
Jan 25, 2022
If the student submits a solution using System.Random but not
package.yaml
, the error would be:There are a few possibilities:
package.yaml
that includesrandom
under dependencies, just like how we expect that if students use any dependencies they submitpackage.yaml
. This is the status quo. If this is the decision, the action is to close this issue and do nothing more.random
to https://github.com/exercism/haskell/blob/main/exercises/practice/robot-name/package.yaml, presuming that every student who wants to solve this exercise will use it. This is a fine presumption because you might still get something that passes the tests without usingrandom
if you assign IDs sequentially, though you'd sort of be going against the spirit of the tests. If this is the decision, the action is to submit such a PR, which I would approve as long as it sufficiently summarises the above reasoning ("you might still get something that passe the tests without usingrandom
if...") and links to this issue using a word in https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue.If you are viewing this issue and are unsure what decision to make, be assured that you have my support if you choose to make a PR that implements the latter, and that the latter is my current recommendation.
Perhaps there should be some exercise where we explicitly teach students about the necessity of submitting package.yaml when using packages, but that is sounding like a concept exercise to me.
The text was updated successfully, but these errors were encountered: