Skip to content

type-and-furious: could not load Imports #38

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

Closed
simonmichael opened this issue Feb 10, 2023 · 5 comments
Closed

type-and-furious: could not load Imports #38

simonmichael opened this issue Feb 10, 2023 · 5 comments

Comments

@simonmichael
Copy link
Contributor

A runnability issue: currently it can't be run from outside the directory.

~/src/tiny-games-hs$ default/type-and-furious/type-and-furious.hs 

default/type-and-furious/type-and-furious.hs:2:1: error:
    Could not load module ‘Imports’
    it is a hidden module in the package ‘http2-3.0.3’
    it is a hidden module in the package ‘http2-3.0.3’
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
  |
2 | import Imports;printSec sec=do{when(sec>=(-0.01))$do{printf
  | ^^^^^^^^^^^^^^
@lsmor
Copy link
Contributor

lsmor commented Feb 11, 2023

I am trying to get this. The problem is that runghc is locking for Imports in the root folder instead of default/type-and-furious... I am trying to execute with stack but I have a problem with my stack instalation. It hangs. Do you know any ghc flag to tell "Hey use this file to link"?

@simonmichael
Copy link
Contributor Author

@lsmor it looks like you fixed this with #43. But I took the liberty of replacing the "ghc" resolver with lts like other scripts - while it worked for me, in general I believe it's a very restricted snapshot not intended for general use.

If a stack script appears to hang, it's probably installing deps the first time you run it - try adding --verbosity=info to the stack command to show progress.

@lsmor
Copy link
Contributor

lsmor commented Feb 11, 2023

@simonmichael . Yes, apparently stack is downloading the snapshot info but with no console output, so it seems like hanging. The reasons I picked resolver: ghc-9.2.5 are:

  • It works fast. All you need is ghc installed... so it doesn't "hang" 😅
  • The default-10-80 category precisely states "packages shipped with the compiler" which is the exact definition of such a resolver, so I thougth It was a good choice.

Of course, feel free to change it to lts if that improves user experience

@simonmichael
Copy link
Contributor Author

@lsmor I see, perhaps I shouldn't have touched it then, feel free to change back if you prefer. User experience seems the same here.

@simonmichael
Copy link
Contributor Author

I understood your comment better ("doesn't hang"), have now changed it back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants