-
Notifications
You must be signed in to change notification settings - Fork 108
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
ReadMe sample code crashes at run-time #178
Comments
See #110 (comment) for a workaround. |
Well, now, at least, it runs, but pretty it isn't:
|
Hmm, perhaps you may also try this workaround as well: #110 (comment), and I think we should close this in favor of #110. FTR, I even tried using the Windows Subsystem for Linux, but there I noticed that stack was really slow, so I ended up using a real *nix virtual machine (Ubuntu and Debian so far). |
Thank you for your help 👍 The workarounds enable me to get code running, but this hardly seems like a satisfactory solution. While I grant that there's small issues with QuickCheck tests on Windows as well (or, at least, on my system), they're nowhere near as conspicuous as these. ATM, it's not clear to me at all why this problem exists, but if I can do something to help address it, I'd like to offer to spend a few hours doing so, but I'm going to need some guidance. Whether you want to close this issue in favour of another I have no opinion. Feel free to close this issue if you feel the other one better captures the problem; I can't evaluate whether or not that's the case. |
Yeah, nobody who works on Hedgehog uses Windows right now, so it is hard for us to resolve. We'd love for someone to spend time on it, though. We might be able to add the transliteration hack to the library (it's good enough for GHC) - or follow one of the other avenues in #110. Closing in favour of #110, where the workarounds are collected. |
@ploeh, if you execute |
Thanks, but
|
Weird... Are you using the Windows Subsystem for Linux or just the Git Bash? |
You should enter this in a regular command prompt (cmd.exe) since it's a Windows command, and then start Git Bash from there - - or just use ConEmu which takes care of all this. |
Did you also set stdout/err encoding to UTF-8 as per #110 (comment)? |
I've tried with and without. It makes no difference. |
When I have to use Windows, I use the stable version of https://conemu.github.io In the gif I posted, I'm using the latest stable version of ConEmu. Perhaps ConEmu deals with UTF-8 far better than cmd.exe (There are other benefits of using ConEmu anyway.) |
I just tried in cmd instead of Bash. Same problem. I wonder if it's just my system that behaves strangely. I'll try on another machine... |
I wonder if it's the Danish locale (but I'm using the Greek locale so it shouldn't matter). Still, I'd be curious to see what happens if you try running a Git Bash from inside ConEmu on that machine... |
Most likely. Git bash handles this quite poorly, so it's unlikely to get much worse, one could hope. For the last many months, I haven't had the mental bandwidth to look into new tooling, but for the next month or so, I hope that'll change. If so, this is high on my list of things to look at.
I wonder the same 😄 |
Tried all the above variations on another machine. Same result 😢 Those two machines aren't that different, though. For instance, both run Danish locale. In many ways, I try to keep them in sync with each other... |
Indeed, the built-in Windows command prompt (cmd.exe) has issues with UTF-8. ConEmu works fine though: FTR, I've tried this with a rather old, but battle-tested, stable, version of ConEmu, v16.12.06. For a long time, this was the recommended, stable, version on their website. Perhaps, newer versions of ConEmu (and even Cmder which derives from ConEmu) will work fine as well. You may also try the Windows Subsystem for Linux, but IME it's still not there yet. |
@ploeh, even more interesting news. As an alternative to the built-in Windows command prompt (cmd.exe), ConEmu and Cmder, one can simply use the terminal inside VSCode by setting it to a Git Bash: |
I'm trying to follow the code examples in the ReadMe file, but it throws an exception at run time:
FWIW, I tried to simplify the file even further in order to troubleshoot if something else could be the matter:
The reason I included the
foo
function was that I wanted to verify that there isn't something fundamentally wrong with the file, such as a non-printable character that GHCi would choke on. That doesn't seem to be the case:My environment:
Am I doing anything wrong? Is there something I can do to troubleshoot?
The text was updated successfully, but these errors were encountered: