MondayMorningHaskell / haskellings

An automated tutorial to teach you about Haskell!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not find ghc-8.8.4

nixant opened this issue · comments

NoGhcError is thrown when ghc is not installed.

The code looks for the directory ghc-version (ghc-8.8.4), but in some cases the name of the folder where stack installs ghc can be different, e.g ghc-tinfo6-8.8.4 in my case.

One solution seems to replace the predicate for find here:

return $ fmap (pathJoin fullPath) (find (==ghcVersion) subContents)
to (isSuffixOf ghcVersionNumber)

@nixant Let's make it so that the version number (8.8.4) has to be a suffix but it should contain ghc somewhere in the directory. That should work for your case, right?

@MondayMorningHaskell yes that would work for my case. We can also check that ghc is prefix and version number is suffix, this will cover the current case as well.

@nixant Sorry took me a while to get to this, but here's a PR if you want to take a look!

#42

Thanks for fixing it.