-
Notifications
You must be signed in to change notification settings - Fork 841
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
Cannot use "getDirectoryConents" function in stack project on Windows 10. I can in Stack ghci #2135
Comments
|
Before I first installed stack I uninstalled my previous ghc and then used |
Wow, this worked! Thanks, it is installing correctly now. |
Cool, glad it's working! |
Is there a disadvantage to having the |
@ahgibbons Not really, infact, I think it is worthwile revisiting that default - #1901 It makes it a little bit harder to use custom ghc installs, and could potentially use up more diskspace if you already have a ghc install. That's the only downside AFAICT. It would certainly save me the effort of asking about ghc installation method :) |
I'm having a problem listing the files in a directory on Windows 10. I am using the
getDirectoryContents
function located in theSystem.Directory
(directory) package. When building the program Stack tries to install the time package and fails. The suggestion is to add MinGW+MSYS to the toolchain. However, when I usestack ghci
I am able to use thegetDirectoryContents
function. Is there a reason why I cannot use the same function when building a program?Steps to Reproduce:
stack new getFiles
directory
to thebuild-depends
of the getFiles.cabal file.stack build
.Expected:
I expected the program to compile.
Actual:
The program did not compile. Here is my error message:
My stack version is:
Version 1.1.1, Git revision 990fbb1aec2f0badeaefe30788ac9309dc179f22 x86_64 hpack-0.14.0
Here is the output of
stack build --verbose
:Running in ghci
getFiles
directory made above.stack ghci
System.Directory
.files <- getDirectoryContents '.'
print files
The results is the output of the files and folders in the getFiles folder. As expected.
The text was updated successfully, but these errors were encountered: