What could be done is letting the community rate the quality of the modules for each platform? Maybe with user comments? Like <a href="http://amazon.com">amazon.com</a> (so we <a href="http://hackazon.org">hackazon.org</a> ;-) &nbsp;And using lambdas instead of stars for giving the rating :)<div>
<div><div><div><div><div><div><div><div><br><br><div class="gmail_quote">On Tue, Jan 13, 2009 at 6:13 PM, Don Stewart <span dir="ltr">&lt;<a href="mailto:dons@galois.com">dons@galois.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Well, the number one thing is to use Cabal and the cabal-install tool.<br>
That is the simplest way to avoid headaches.<br>
<br>
Regarding libraries in general, the platform project is underway, aiming<br>
to bless a set of stable, &quot;batteries included&quot; packages, saving<br>
duplicated work determining which, say, json library to use.<br>
<br>
-- Don<br>
<br>
<br>
jamiiecb:<br>
<div><div></div><div class="Wj3C7c">&gt; I agree completely. There is not nearly enough documentation on<br>
&gt; packaging in haskell and too many hackage packages are broken or do<br>
&gt; not install. I know several people are working on improving this but<br>
&gt; they seem do be doing so rather quietly. Could someone briefly outline<br>
&gt; what improvements are planned and what stage the current work is at? I<br>
&gt; remember seeing some demos at anglohaskell during the summer but<br>
&gt; nothing since.<br>
&gt;<br>
&gt; Jamie<br>
&gt;<br>
&gt; On Tue, Jan 13, 2009 at 3:33 PM, Regis Saint-Paul<br>
&gt; &lt;<a href="mailto:regis.saint-paul@create-net.org">regis.saint-paul@create-net.org</a>&gt; wrote:<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; I&#39;ve seen many times the monad topic coming around on the cafe and plentiful<br>
&gt; &gt; tutorials on monads have been published. However, as a complete Haskell<br>
&gt; &gt; newbie coming from OOP, I felt monads were not particularly difficult to<br>
&gt; &gt; grasp, and very exciting to work with.<br>
&gt; &gt;<br>
&gt; &gt; During my experiments with Haskell so far, the main problems I kept bumping<br>
&gt; &gt; into were not related to the language but to its libraries: their<br>
&gt; &gt; compilation and installation. Unfortunately, this topic has not received<br>
&gt; &gt; nearly as much attention. I was unable to find a comprehensive tutorial on<br>
&gt; &gt; how to deal with the variety of problems I get when trying to install<br>
&gt; &gt; Hackage packages. This turned out to be (and still is) THE main source of<br>
&gt; &gt; wasted time and headaches. And worse, unlike type problems, these are not<br>
&gt; &gt; interesting ones to solve.<br>
&gt; &gt;<br>
&gt; &gt; Thus, as a beginner, the package management is what is really getting in the<br>
&gt; &gt; way of switching to Haskell--not the language. Even books like Real World<br>
&gt; &gt; Haskell (otherwise excellent) ignore entirely the topic. Cabal and<br>
&gt; &gt; Cabal-install are clearly wonderful applications that make installing most<br>
&gt; &gt; packages very straightforward. Unfortunately, whenever this &quot;standard&quot;<br>
&gt; &gt; method for package installation fails (or when it is not available as with,<br>
&gt; &gt; e.g., gtk2hs), I find myself in complete disarray.<br>
&gt; &gt;<br>
&gt; &gt; Below are some of the questions and issues I faced regarding package<br>
&gt; &gt; management:<br>
&gt; &gt;<br>
&gt; &gt; - For a number of packages, cabal-install gets stuck and has to be killed. I<br>
&gt; &gt; assume this is due to some difficulties in solving the dependencies and it<br>
&gt; &gt; is fine, not all can be automated and cabal-install is not responsible for<br>
&gt; &gt; poor packages. But the question then becomes what to do from there? Is their<br>
&gt; &gt; some method to solve dependencies? How should we proceed to &quot;debug&quot; a<br>
&gt; &gt; package installation? How do gurus deal with that? (maybe some less known<br>
&gt; &gt; command line arguments? Or ways to figure out the problem and work out its<br>
&gt; &gt; solution (cabal-install is silent in such case)? In particular, how to know<br>
&gt; &gt; why did cabal get stuck in the first place?<br>
&gt; &gt;<br>
&gt; &gt; - Some packages on Hackage are reported as not building successfully with<br>
&gt; &gt; GHC6.10 (e.g., encoding) while others do not build with 6.8 (e.g., salvia)<br>
&gt; &gt; and the later might depend on the former...What is one supposed to do in<br>
&gt; &gt; such case? For example, is it an appropriate way to proceed to compile a<br>
&gt; &gt; package with one version of GHC and then use the compiled package with<br>
&gt; &gt; another version of GHC? Is it safe? What could possibly go wrong? If it is<br>
&gt; &gt; the right way to go, how should we setup the two GHC versions? For instance,<br>
&gt; &gt; should we have a shared package configuration file and choose through the<br>
&gt; &gt; path which GHC is used or is there nicer way to set this up?<br>
&gt; &gt;<br>
&gt; &gt; - Taking for example the &quot;encoding&quot; package on Hackage. Last time I tried,<br>
&gt; &gt; the log was saying it fails to build on GHC 6.10, however, looking inside<br>
&gt; &gt; this Hackage log, I could see a successful compilation using &quot;preferred<br>
&gt; &gt; versions&quot;. So it looks as if the thing can be compiled somehow. What should<br>
&gt; &gt; one do with this information? If cabal manages to compile it using this<br>
&gt; &gt; method on Hackage, then isn&#39;t cabal install just doing it on my disk? Is it<br>
&gt; &gt; possible through some command line? Is it possible manually (without<br>
&gt; &gt; cabal-install) and, if so, how? (I tried to copy-past the build instruction<br>
&gt; &gt; as it appeared on the log...that somehow compiled, but then, I failed to<br>
&gt; &gt; figure out how to install...)<br>
&gt; &gt;<br>
&gt; &gt; - I&#39;m primarily a windows user and lots of my initial struggles probably<br>
&gt; &gt; came from that. After many difficulties, I figured out that installing MinGW<br>
&gt; &gt; and MSys was *THE* way to get a bit more of the things working. First, a lot<br>
&gt; &gt; of time would be saved by just saying clearly on the GHC download page that<br>
&gt; &gt; MinGW and MSys are mandatory installation (or even package that with GHC for<br>
&gt; &gt; the windows distribution if license allows, who cares the extra few Mb).<br>
&gt; &gt; Even if that is not technically exact, i.e., even if ghci and many trivial<br>
&gt; &gt; command line programs can work without, MSys and MinGW turn out to be quiet<br>
&gt; &gt; necessary whenever trying to install anything producing side effect. Making<br>
&gt; &gt; it plain that these two are necessary would real come has a great time<br>
&gt; &gt; savers for newbie like me on windows (personal opinion of course). Or, if<br>
&gt; &gt; another path exists to go without these two, I&#39;d be very glad to learn.<br>
&gt; &gt; Besides, even these tools basic installation is not enough, you need<br>
&gt; &gt; automake and various things of the like. That makes me wonder if the most<br>
&gt; &gt; precious skill for programming with Haskell would not be a strong C/C++<br>
&gt; &gt; programming background.<br>
&gt; &gt;<br>
&gt; &gt; - In face of the difficulties with windows, I switched to Linux. While some<br>
&gt; &gt; things worked better, there were still lots of difficulties with package<br>
&gt; &gt; compilation. For instance, it is very difficult to figure out which Linux<br>
&gt; &gt; packages of a given distribution are needed for compiling this or that<br>
&gt; &gt; package. Again, gtk2hs is epitome here: which C development packages are<br>
&gt; &gt; needed to compile it is obscure at best (cairo, codeview, etc...). I ended<br>
&gt; &gt; up querying the Debian package management with any keyword found after<br>
&gt; &gt; running gtk2hs and randomly installing all the dev packages...And when<br>
&gt; &gt; gtk2hs finally compiled, it failed to install anyway. As of today, I&#39;ve<br>
&gt; &gt; never been able to compile even the dumbest demo using gtk2hs whether on<br>
&gt; &gt; linux or on windows and whether using ghc 6.8.3 or 6.10.1. On windows, the<br>
&gt; &gt; automated setup install worked but did not allow me to compile with codeview<br>
&gt; &gt; and I still do not know how to add codeview to the install packages. Trust<br>
&gt; &gt; that I tried hard and read the docs thoroughly. Gtk2hs is just on of many<br>
&gt; &gt; examples; I had problems under Linux also with, e.g., Happs, yi, database<br>
&gt; &gt; things, etc. and figured out that the situation was roughly identical to<br>
&gt; &gt; windows with MSys and MinGW. So Linux appears not to be the right solution<br>
&gt; &gt; here. Maybe it&#39;s just that Linux users are more experienced with the GNU<br>
&gt; &gt; C/C++ libraries...but it won&#39;t help a windows user to switch to Linux since<br>
&gt; &gt; this knowledge can&#39;t be built out of thin air.<br>
&gt; &gt;<br>
&gt; &gt; - Would there be some binary version of cabal targeting various OSs? I<br>
&gt; &gt; believe the Haskell platform project is about that. But without waiting for<br>
&gt; &gt; a fair and objective selection of the packages (it seems to be the current<br>
&gt; &gt; status of the project), I&#39;d be happy working with some authoritative bundle<br>
&gt; &gt; produced by a Haskell guru and would trust his subjective choices (who am I<br>
&gt; &gt; to question these choices anyway). Or even an image (e.g., virtual box or<br>
&gt; &gt; Xen) of a fully setup development environment since there are so many<br>
&gt; &gt; dependencies involved in, e.g., simply compiling GHC...<br>
&gt; &gt;<br>
&gt; &gt; Now, one might argue that these are not Haskell problems, that they are<br>
&gt; &gt; normal when dealing with non-mature packages. So let me explain why I&#39;ve<br>
&gt; &gt; been trying hard to install these packages:<br>
&gt; &gt;<br>
&gt; &gt; As a beginner with no experience with emacs, I tried to find some IDE-like<br>
&gt; &gt; environment which would, at least, save me from manually reloading files in<br>
&gt; &gt; ghci or help me browse the source files. Following the Haskellwiki advice,<br>
&gt; &gt; that led to trying out Yi, Leksah, eclipsefp, or a Visual Studio extension.<br>
&gt; &gt; To this date, NOT ANY SINGLE ONE of these worked, be it on Linux or Windows.<br>
&gt; &gt; I had to resort to learning emacs which seems the only sensible choice<br>
&gt; &gt; available today.<br>
&gt; &gt;<br>
&gt; &gt; I am particularly unskilled, no question here. But, would a charitable soul<br>
&gt; &gt; take the pain of writing a comprehensive package management tutorial instead<br>
&gt; &gt; of a monad one, (s)he would have my deepest gratitude :)<br>
&gt; &gt;<br>
&gt; &gt; Apologies for the long mail.<br>
&gt; &gt;<br>
&gt; &gt; -Regis<br>
&gt; &gt;<br>
&gt; &gt; P.S. People on #haskell are wonderful. They helped me solve many issues.<br>
&gt; &gt; Unfortunately, solving specific instances of problem did not contribute much<br>
&gt; &gt; to a deeper understanding of the internal working. I find myself randomly<br>
&gt; &gt; trying things without knowing which would work or why; Hence this plea for a<br>
&gt; &gt; tutorial.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Haskell-Cafe mailing list<br>
&gt; &gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; &gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
&gt; &gt;<br>
&gt; _______________________________________________<br>
&gt; Haskell-Cafe mailing list<br>
&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div></div></div></div></div></div></div></div></div>