
On 11-02-25 05:40 AM, Michael Snoyman wrote:
Some of the dependencies for Yesod (such as haskell-src) require happy. For the "Yesod in Five Minutes" page[1], I've given instructions to cabal install happy and then cabal install yesod. However, as Xavier Shay pointed out to me, this won't actually work on a vanilla install, since happy gets installed in the cabal bin folder, which is not by default on the PATH. Two questions:
* Should we document this somewhere in the Haskell Platform install process? I'm sure many old-time users of cabal are well aware that they need ~/.cabal/bin in the PATH, but new users will not be.
The need to mention ~/.cabal/bin belongs to the empty user guide of cabal-install. Haskell Platform includes happy; I wonder why one would "cabal install happy" after having Haskell Platform. Haskell Platform normally puts happy in case os of Windows Vista -> \Program Files (x86)\Haskell Platform\version\lib\extralibs\bin MacOS X -> I don't know, but still not ~/.cabal/bin Linux -> case how you obtained of Your Linux Distro -> /usr/bin Built From Source -> /usr/local/bin Haskell Platform could put happy in ~/.cabal/bin but would require non-default tinkering. Since Haskell Platform includes cabal-install, the empty user guide of Haskell Platform should talk about ~/.cabal/bin, yes. But this is because the empty user guide of Haskell Platform is the union of the user guides of members such as cabal-install. In other words, fixing it in the empty Haskell Platform user guide without fixing it in the empty cabal-install user guide fixes only half of the problem.
I would also like to update Yesod's documentation; does anyone have standard phrasing that is applicable to all operating systems?
case os of Windows Vista -> \Users\username\AppData\Roaming\cabal\bin MacOS X -> ~/.cabal/bin Linux -> ~/.cabal/bin
* Should we consider modifying the build tools to automatically look for build dependencies in the cabal bin folder?
Fixing build tools (such as cabal-install itself) to secretly search ~/.cabal/bin fixes only half of the problem. So cabal-install can find happy somewhere, great; but I cannot find it, and perhaps I want to use it outside of cabal-install.