Open drake-mer opened 6 years ago
Thanks for the heads up, a pull request would be great.
One item in particular - the many
combinator is not in scope at the point where the tutorial uses it (many1
is though). I'm not sure what the workaround is yet.
@elijahbal are you still planning to submit a PR to update the tutorial? It would be a lot more useful to people if it worked with the latest GHC.
Apparently the workaround is to add > import Control.Applicative (many)
to GettingStarted.lhs
.
EDIT: > import Text.ParserCombinators.ReadP (many)
might be better - I don't know enough to decide.
Also, I had to add > import Control.Monad (void)
to get void
, mentioned in section 3.3.
@DavidAntliff I don't really have the time anymore to focus on it but if really you are encouraging me I can delve into it. I'm with you in any case.
@elijahbal It's ok, I've been finding the issues as I go and working out how to get past them. I don't need anything, had just wondered if maybe a PR was still on its way - no problem if not.
Also, adding a Cabal file for a full build would be nice.
Hi All,
I did a quick check with ghc 8.6.5, and did some small fixes. If you find any issues, please say which exact line fails for you (and provide a patch or the fix in a comment or bug report), then I can fix it. I didn't manage to find where either 'many' or 'void' were missing, but maybe these were added to the exports in updates to the parsec package after you looked at the tutorial?
I also added a cabal file, so now you can do something like 'cabal new-repl'. It works, but it's not quite right yet - you get some warnings to ignore.
Tutorial on parsec is out of date, doesn't work with current latest Haskell/GHC distribution for various reason. I would be glad to submit a pull request to fix it.