Skip to content
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

stack ghci cannot find imported module in non-project local directory #2878

Closed
bitemyapp opened this issue Dec 27, 2016 · 2 comments
Closed

stack ghci cannot find imported module in non-project local directory #2878

bitemyapp opened this issue Dec 27, 2016 · 2 comments

Comments

@bitemyapp
Copy link
Contributor

@bitemyapp bitemyapp commented Dec 27, 2016

Was looking into this: https://github.com/pushcx/stack-bug

The following worked, which surprised a user:

Prelude> :l Foo.hs Bar.hs 
[1 of 2] Compiling Bar              ( Bar.hs, interpreted )
[2 of 2] Compiling Foo              ( Foo.hs, interpreted )
Ok, modules loaded: Foo, Bar.

Just loading Foo.hs by itself does not with stack ghci whereas ghci does. Is there a good reason for this difference in behavior? If there isn't a strong reason I'd rather the difference be harmonized.

@bitemyapp
Copy link
Contributor Author

@bitemyapp bitemyapp commented Dec 27, 2016

User's workaround was stack ghci --ghci-options -i.

mgsloan added a commit that referenced this issue Jan 31, 2017
@mgsloan
Copy link
Contributor

@mgsloan mgsloan commented Jan 31, 2017

Good point! I've changed stack ghci to include the current work dir if the config contains no packages (like the global config).

@mgsloan mgsloan closed this Jan 31, 2017
@mgsloan mgsloan added this to the P2: Should milestone Jan 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.