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

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

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

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

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

On Tue, 2009-01-13 at 18:43 +0100, Peter Verswyvelen wrote:
What could be done is letting the community rate the quality of the modules for each platform? Maybe with user comments? Like amazon.com (so we hackazon.org ;-) And using lambdas instead of stars for giving the rating :)
On Tue, 2009-01-13 at 15:55 -0200, Mauricio wrote:
There's a 'stability' field on cabal description files. Maybe it could appear after the name on the main listing. Or, all packages marked as 'Stable' at that field could get a beautifull color.
My main problem with these mechanisms is that they require a lot of manual work and there is no way to ensure the information is accurate or authoritative. If what we want to know is "does the package build" then we should build it and find out. We should build it on a 100 different platform combinations and combine the information. That's what we're trying to do with the new haskage-server and cabal-install. Lack of developer time is hampering progress. The stability field is almost useless. There is no agreement on what it means and most packages lack it. If what we want to know is "is this version of the package API compatible with this one" then we should follow the package versioning policy. We should let packages opt-in to the policy and if they op-in we should enforce it. That gives us real information and real guarantees. Similar comments apply for test suites and code coverage. Automation and collection of useful information. What human comments are great for however is describing the quality of the API, how well it composes, how good the documentation is, how easy it is to understand and use. That kind of information can only be gleaned through use. I don't know if a star/lambda rating system would be very helpful. There are only a few similar packages in each category (even for xml and databases). Once we eliminate the ones that clearly do not build (using the automatically collected info) then there will only be the comments for two or three packages to review. That's not that much and star rating probably do not provide a very good summary to help in that decision. Automation! Automation! Automation! (Oh and more hackers to help us with these vial community infrastructure projects) Duncan

Don Stewart wrote:
Well, the number one thing is to use Cabal and the cabal-install tool. That is the simplest way to avoid headaches.
I'm sure cabal works very well for many people, but for anyone who has used Debian based distributions for some time, cabal really does seem like a backward step. For instance, I regularly develop on 6 machines; personal laptop, home desktop, 2 work desktops and 2 work build machines. At work, the main output of my development work is Debian packages (which get installed on hundreds of machines), and the Debian packages I create have build depends on whatever compilers and libraries are required to build them. We also have a build bot that runs nightly in a clean chroot for each package so that build depends can be verified to be correct. However, if I install compilers or libraries using cabal there is no package to build depend on, breaking a system which currently works very, very well for all the code we build in C, C++ and Ocaml. Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "Arguing that Java is better than C++ is like arguing that grasshoppers taste better than tree bark." -- Thant Tessman

mle+cl:
Don Stewart wrote:
Well, the number one thing is to use Cabal and the cabal-install tool. That is the simplest way to avoid headaches.
I'm sure cabal works very well for many people, but for anyone who has used Debian based distributions for some time, cabal really does seem like a backward step.
For instance, I regularly develop on 6 machines; personal laptop, home desktop, 2 work desktops and 2 work build machines.
At work, the main output of my development work is Debian packages (which get installed on hundreds of machines), and the Debian packages I create have build depends on whatever compilers and libraries are required to build them. We also have a build bot that runs nightly in a clean chroot for each package so that build depends can be verified to be correct.
However, if I install compilers or libraries using cabal there is no package to build depend on, breaking a system which currently works very, very well for all the code we build in C, C++ and Ocaml.
I encourage *strongly* the Debian community to package up hackage packages natively, as we have done on Gentoo and Arch. (This can be automated, in fact, see cabal2arch). cabal-install will work on any system. If you have particular distro requirements, consider distro-specific package tools. -- Don

Don Stewart wrote:
mle+cl:
Don Stewart wrote:
Well, the number one thing is to use Cabal and the cabal-install tool. That is the simplest way to avoid headaches. I'm sure cabal works very well for many people, but for anyone who has used Debian based distributions for some time, cabal really does seem like a backward step.
For instance, I regularly develop on 6 machines; personal laptop, home desktop, 2 work desktops and 2 work build machines.
At work, the main output of my development work is Debian packages (which get installed on hundreds of machines), and the Debian packages I create have build depends on whatever compilers and libraries are required to build them. We also have a build bot that runs nightly in a clean chroot for each package so that build depends can be verified to be correct.
However, if I install compilers or libraries using cabal there is no package to build depend on, breaking a system which currently works very, very well for all the code we build in C, C++ and Ocaml.
I encourage *strongly* the Debian community to package up hackage packages natively, as we have done on Gentoo and Arch.
(This can be automated, in fact, see cabal2arch).
cabal-install will work on any system. If you have particular distro requirements, consider distro-specific package tools.
Get on the debian-haskell list to discuss this! I've looked into it myself, but got stuck on a severely outdated haddock package. That won't be fixed until GHC 6.10 makes it into experimental or unstable :-( /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus Haskell is an even 'redder' pill than Lisp or Scheme. -- PaulPotts

Erik de Castro Lopo wrote:
Don Stewart wrote:
Well, the number one thing is to use Cabal and the cabal-install tool. That is the simplest way to avoid headaches.
I'm sure cabal works very well for many people, but for anyone who has used Debian based distributions for some time, cabal really does seem like a backward step.
For instance, I regularly develop on 6 machines; personal laptop, home desktop, 2 work desktops and 2 work build machines.
At work, the main output of my development work is Debian packages (which get installed on hundreds of machines), and the Debian packages I create have build depends on whatever compilers and libraries are required to build them. We also have a build bot that runs nightly in a clean chroot for each package so that build depends can be verified to be correct.
However, if I install compilers or libraries using cabal there is no package to build depend on, breaking a system which currently works very, very well for all the code we build in C, C++ and Ocaml.
Just in case this isn't clear yet - Cabal is not meant to be a replacement for native Debian packages, it is supposed to let the Debian folks package Haskell stuff more easily. We didn't want to duplicate everything that a good OS packaging system does in Cabal, that's just a waste of time and likely to conflict with what the OS packager is already doing. Sounds like the Debian folks could use some help with automatically packaging Cabal packages, though. Cheers, Simon

Simon Marlow wrote:
Sounds like the Debian folks could use some help with automatically packaging Cabal packages, though.
Well I've joined the debian-haskell mailing list and I'll do what I can to help. Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "I would buy a Mac today if I was not working at Microsoft." -- Senior Microsoft exective Jim Allchin in a 200 email to Bill Gates : http://www.iowaconsumercase.org/010807/PLEX_7264.pdf

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

On Tue, 2009-01-13 at 16:21 +0000, Jamie Brandon wrote:
I agree completely. There is not nearly enough documentation on packaging in haskell and too many hackage packages are broken or do not install. I know several people are working on improving this but they seem do be doing so rather quietly. Could someone briefly outline what improvements are planned and what stage the current work is at? I remember seeing some demos at anglohaskell during the summer but nothing since.
If you are talking about the new hackage server then the code is here: http://code.haskell.org/hackage-server/ It should work though it is not feature complete. Patches gratefully accepted. The build reporting should work with the current cabal-install, though again it needs some polishing. Nothing especially difficult, it's primarily a lack of developer time. We've got too many "high priority" TODO items. We are spread too thin across the projects: Cabal, cabal-install, hackage-server, haskell-platform. More helpers are required. Your Haskell needs you! Sign up today! http://hackage.haskell.org/trac/hackage/#StartingpointsfornewCabalhackers Duncan

My experience from using GHC under Windows XP is very similar. Many
packages (especially those involving bindings to C packages) are at
least painful to build.
Regarding encoding package: it compiles fine for me:
C:\Documents and Settings\Metharius>cabal install encoding
Resolving dependencies...
Downloading encoding-0.4.1...
Configuring encoding-0.4.1...
Preprocessing library encoding-0.4.1...
Building encoding-0.4.1...
[ 1 of 37] Compiling Data.Encoding.Helper.Template (
Data\Encoding\Helper\Template.hs,
dist\build\Data\Encoding\Helper\Template.o )
[ 2 of 37] Compiling Data.Encoding.GB18030Data (
Data\Encoding\GB18030Data.hs, dist\build\Data\Encoding\GB18030Data.o )
[ 3 of 37] Compiling Data.Encoding.Base ( Data\Encoding\Base.hs,
dist\build\Data\Encoding\Base.o )
[ 4 of 37] Compiling Data.Encoding.GB18030 ( Data\Encoding\GB18030.hs,
dist\build\Data\Encoding\GB18030.o )
[ 5 of 37] Compiling Data.Encoding.KOI8U ( Data\Encoding\KOI8U.hs,
dist\build\Data\Encoding\KOI8U.o )
[ 6 of 37] Compiling Data.Encoding.KOI8R ( Data\Encoding\KOI8R.hs,
dist\build\Data\Encoding\KOI8R.o )
[ 7 of 37] Compiling Data.Encoding.CP1258 ( Data\Encoding\CP1258.hs,
dist\build\Data\Encoding\CP1258.o )
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Loading package syb ... linking ... done.
Loading package array-0.2.0.0 ... linking ... done.
Loading package containers-0.2.0.0 ... linking ... done.
Loading package packedstring-0.1.0.1 ... linking ... done.
Loading package pretty-1.0.1.0 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package bytestring-0.9.1.4 ... linking ... done.
Loading package regex-base-0.72.0.2 ... linking ... done.
Loading package regex-posix-0.72.0.3 ... linking ... done.
Loading package regex-compat-0.71.0.1 ... linking ... done.
Loading package base-3.0.3.0 ... linking ... done.
[ 8 of 37] Compiling Data.Encoding.CP1257 ( Data\Encoding\CP1257.hs,
dist\build\Data\Encoding\CP1257.o )
[ 9 of 37] Compiling Data.Encoding.CP1256 ( Data\Encoding\CP1256.hs,
dist\build\Data\Encoding\CP1256.o )
[10 of 37] Compiling Data.Encoding.CP1255 ( Data\Encoding\CP1255.hs,
dist\build\Data\Encoding\CP1255.o )
[11 of 37] Compiling Data.Encoding.CP1254 ( Data\Encoding\CP1254.hs,
dist\build\Data\Encoding\CP1254.o )
[12 of 37] Compiling Data.Encoding.CP1253 ( Data\Encoding\CP1253.hs,
dist\build\Data\Encoding\CP1253.o )
[13 of 37] Compiling Data.Encoding.CP1252 ( Data\Encoding\CP1252.hs,
dist\build\Data\Encoding\CP1252.o )
[14 of 37] Compiling Data.Encoding.CP1251 ( Data\Encoding\CP1251.hs,
dist\build\Data\Encoding\CP1251.o )
[15 of 37] Compiling Data.Encoding.CP1250 ( Data\Encoding\CP1250.hs,
dist\build\Data\Encoding\CP1250.o )
[16 of 37] Compiling Data.Encoding.BootString (
Data\Encoding\BootString.hs, dist\build\Data\Encoding\BootString.o )
[17 of 37] Compiling Data.Encoding.ISO885916 (
Data\Encoding\ISO885916.hs, dist\build\Data\Encoding\ISO885916.o )
[18 of 37] Compiling Data.Encoding.ISO885915 (
Data\Encoding\ISO885915.hs, dist\build\Data\Encoding\ISO885915.o )
[19 of 37] Compiling Data.Encoding.ISO885914 (
Data\Encoding\ISO885914.hs, dist\build\Data\Encoding\ISO885914.o )
[20 of 37] Compiling Data.Encoding.ISO885913 (
Data\Encoding\ISO885913.hs, dist\build\Data\Encoding\ISO885913.o )
[21 of 37] Compiling Data.Encoding.ISO885911 (
Data\Encoding\ISO885911.hs, dist\build\Data\Encoding\ISO885911.o )
[22 of 37] Compiling Data.Encoding.ISO885910 (
Data\Encoding\ISO885910.hs, dist\build\Data\Encoding\ISO885910.o )
[23 of 37] Compiling Data.Encoding.ISO88599 (
Data\Encoding\ISO88599.hs, dist\build\Data\Encoding\ISO88599.o )
[24 of 37] Compiling Data.Encoding.ISO88598 (
Data\Encoding\ISO88598.hs, dist\build\Data\Encoding\ISO88598.o )
[25 of 37] Compiling Data.Encoding.ISO88597 (
Data\Encoding\ISO88597.hs, dist\build\Data\Encoding\ISO88597.o )
[26 of 37] Compiling Data.Encoding.ISO88596 (
Data\Encoding\ISO88596.hs, dist\build\Data\Encoding\ISO88596.o )
[27 of 37] Compiling Data.Encoding.ISO88595 (
Data\Encoding\ISO88595.hs, dist\build\Data\Encoding\ISO88595.o )
[28 of 37] Compiling Data.Encoding.ISO88594 (
Data\Encoding\ISO88594.hs, dist\build\Data\Encoding\ISO88594.o )
[29 of 37] Compiling Data.Encoding.ISO88593 (
Data\Encoding\ISO88593.hs, dist\build\Data\Encoding\ISO88593.o )
[30 of 37] Compiling Data.Encoding.ISO88592 (
Data\Encoding\ISO88592.hs, dist\build\Data\Encoding\ISO88592.o )
[31 of 37] Compiling Data.Encoding.ISO88591 (
Data\Encoding\ISO88591.hs, dist\build\Data\Encoding\ISO88591.o )
[32 of 37] Compiling Data.Encoding.UTF32 ( Data\Encoding\UTF32.hs,
dist\build\Data\Encoding\UTF32.o )
[33 of 37] Compiling Data.Encoding.UTF16 ( Data\Encoding\UTF16.hs,
dist\build\Data\Encoding\UTF16.o )
[34 of 37] Compiling Data.Encoding.UTF8 ( Data\Encoding\UTF8.hs,
dist\build\Data\Encoding\UTF8.o )
[35 of 37] Compiling Data.Encoding.ASCII ( Data\Encoding\ASCII.hs,
dist\build\Data\Encoding\ASCII.o )
[36 of 37] Compiling Data.Encoding ( Data\Encoding.hs,
dist\build\Data\Encoding.o )
[37 of 37] Compiling System.IO.Encoding ( System\IO\Encoding.hs,
dist\build\System\IO\Encoding.o )
C:\ghc\ghc-6.10.1\bin\ar.exe: creating dist\build\libHSencoding-0.4.1.a
Installing library in C:\Program Files\Haskell\encoding-0.4.1\ghc-6.10.1
Registering encoding-0.4.1...
Reading package info from "dist\\installed-pkg-config" ... done.
Writing new package config file... done.
In any case, passing -v option should be helpful for debugging.
All best
Christopher Skrzętnicki
On Tue, Jan 13, 2009 at 16:33, Regis Saint-Paul
Hi,
I've seen many times the monad topic coming around on the cafe and plentiful tutorials on monads have been published. However, as a complete Haskell newbie coming from OOP, I felt monads were not particularly difficult to grasp, and very exciting to work with.
During my experiments with Haskell so far, the main problems I kept bumping into were not related to the language but to its libraries: their compilation and installation. Unfortunately, this topic has not received nearly as much attention. I was unable to find a comprehensive tutorial on how to deal with the variety of problems I get when trying to install Hackage packages. This turned out to be (and still is) THE main source of wasted time and headaches. And worse, unlike type problems, these are not interesting ones to solve.
Thus, as a beginner, the package management is what is really getting in the way of switching to Haskell--not the language. Even books like Real World Haskell (otherwise excellent) ignore entirely the topic. Cabal and Cabal-install are clearly wonderful applications that make installing most packages very straightforward. Unfortunately, whenever this "standard" method for package installation fails (or when it is not available as with, e.g., gtk2hs), I find myself in complete disarray.
Below are some of the questions and issues I faced regarding package management:
- For a number of packages, cabal-install gets stuck and has to be killed. I assume this is due to some difficulties in solving the dependencies and it is fine, not all can be automated and cabal-install is not responsible for poor packages. But the question then becomes what to do from there? Is their some method to solve dependencies? How should we proceed to "debug" a package installation? How do gurus deal with that? (maybe some less known command line arguments? Or ways to figure out the problem and work out its solution (cabal-install is silent in such case)? In particular, how to know why did cabal get stuck in the first place?
- Some packages on Hackage are reported as not building successfully with GHC6.10 (e.g., encoding) while others do not build with 6.8 (e.g., salvia) and the later might depend on the former...What is one supposed to do in such case? For example, is it an appropriate way to proceed to compile a package with one version of GHC and then use the compiled package with another version of GHC? Is it safe? What could possibly go wrong? If it is the right way to go, how should we setup the two GHC versions? For instance, should we have a shared package configuration file and choose through the path which GHC is used or is there nicer way to set this up?
- Taking for example the "encoding" package on Hackage. Last time I tried, the log was saying it fails to build on GHC 6.10, however, looking inside this Hackage log, I could see a successful compilation using "preferred versions". So it looks as if the thing can be compiled somehow. What should one do with this information? If cabal manages to compile it using this method on Hackage, then isn't cabal install just doing it on my disk? Is it possible through some command line? Is it possible manually (without cabal-install) and, if so, how? (I tried to copy-past the build instruction as it appeared on the log...that somehow compiled, but then, I failed to figure out how to install...)
- I'm primarily a windows user and lots of my initial struggles probably came from that. After many difficulties, I figured out that installing MinGW and MSys was *THE* way to get a bit more of the things working. First, a lot of time would be saved by just saying clearly on the GHC download page that MinGW and MSys are mandatory installation (or even package that with GHC for the windows distribution if license allows, who cares the extra few Mb). Even if that is not technically exact, i.e., even if ghci and many trivial command line programs can work without, MSys and MinGW turn out to be quiet necessary whenever trying to install anything producing side effect. Making it plain that these two are necessary would real come has a great time savers for newbie like me on windows (personal opinion of course). Or, if another path exists to go without these two, I'd be very glad to learn. Besides, even these tools basic installation is not enough, you need automake and various things of the like. That makes me wonder if the most precious skill for programming with Haskell would not be a strong C/C++ programming background.
- In face of the difficulties with windows, I switched to Linux. While some things worked better, there were still lots of difficulties with package compilation. For instance, it is very difficult to figure out which Linux packages of a given distribution are needed for compiling this or that package. Again, gtk2hs is epitome here: which C development packages are needed to compile it is obscure at best (cairo, codeview, etc...). I ended up querying the Debian package management with any keyword found after running gtk2hs and randomly installing all the dev packages...And when gtk2hs finally compiled, it failed to install anyway. As of today, I've never been able to compile even the dumbest demo using gtk2hs whether on linux or on windows and whether using ghc 6.8.3 or 6.10.1. On windows, the automated setup install worked but did not allow me to compile with codeview and I still do not know how to add codeview to the install packages. Trust that I tried hard and read the docs thoroughly. Gtk2hs is just on of many examples; I had problems under Linux also with, e.g., Happs, yi, database things, etc. and figured out that the situation was roughly identical to windows with MSys and MinGW. So Linux appears not to be the right solution here. Maybe it's just that Linux users are more experienced with the GNU C/C++ libraries...but it won't help a windows user to switch to Linux since this knowledge can't be built out of thin air.
- Would there be some binary version of cabal targeting various OSs? I believe the Haskell platform project is about that. But without waiting for a fair and objective selection of the packages (it seems to be the current status of the project), I'd be happy working with some authoritative bundle produced by a Haskell guru and would trust his subjective choices (who am I to question these choices anyway). Or even an image (e.g., virtual box or Xen) of a fully setup development environment since there are so many dependencies involved in, e.g., simply compiling GHC...
Now, one might argue that these are not Haskell problems, that they are normal when dealing with non-mature packages. So let me explain why I've been trying hard to install these packages:
As a beginner with no experience with emacs, I tried to find some IDE-like environment which would, at least, save me from manually reloading files in ghci or help me browse the source files. Following the Haskellwiki advice, that led to trying out Yi, Leksah, eclipsefp, or a Visual Studio extension. To this date, NOT ANY SINGLE ONE of these worked, be it on Linux or Windows. I had to resort to learning emacs which seems the only sensible choice available today.
I am particularly unskilled, no question here. But, would a charitable soul take the pain of writing a comprehensive package management tutorial instead of a monad one, (s)he would have my deepest gratitude :)
Apologies for the long mail.
-Regis
P.S. People on #haskell are wonderful. They helped me solve many issues. Unfortunately, solving specific instances of problem did not contribute much to a deeper understanding of the internal working. I find myself randomly trying things without knowing which would work or why; Hence this plea for a tutorial.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Krzysztof Skrzętnicki wrote:
My experience from using GHC under Windows XP is very similar. Many packages (especially those involving bindings to C packages) are at least painful to build.
+1 Also have to love packages that use Unix-specific features as part of their build process. (I even found a page on the Wiki that recommends the use of Bash scripts. Hmm...) I vividle remember Dons repeatedly telling me that I should try out [some package who's name escapes me], and then discovering that it doesn't actually work on Windows at all. (Couldn't this critical information be included somewhere prominent on Hackage??)

On Tue, 2009-01-13 at 19:20 +0000, Andrew Coppin wrote:
I vividle remember Dons repeatedly telling me that I should try out [some package who's name escapes me], and then discovering that it doesn't actually work on Windows at all. (Couldn't this critical information be included somewhere prominent on Hackage??)
This critical information should be provided on each package page on Hackage. It's not quite as trivial as it looks however. If you'd like to help out, we're working on a new hackage-server that allows users to upload build reports. That way we hope to discover automatically which packages do and do not build on various platforms. The basics work but we need more help in polishing it up. Duncan

Duncan Coutts ha scritto:
On Tue, 2009-01-13 at 19:20 +0000, Andrew Coppin wrote:
I vividle remember Dons repeatedly telling me that I should try out [some package who's name escapes me], and then discovering that it doesn't actually work on Windows at all. (Couldn't this critical information be included somewhere prominent on Hackage??)
This critical information should be provided on each package page on Hackage. It's not quite as trivial as it looks however.
If you'd like to help out, we're working on a new hackage-server that allows users to upload build reports. That way we hope to discover automatically which packages do and do not build on various platforms. The basics work but we need more help in polishing it up.
Do you know buildbot? http://buildbot.net/trac
Duncan
Manlio Perillo

On Thu, 2009-01-15 at 00:22 +0100, Manlio Perillo wrote:
Duncan Coutts ha scritto:
On Tue, 2009-01-13 at 19:20 +0000, Andrew Coppin wrote:
I vividle remember Dons repeatedly telling me that I should try out [some package who's name escapes me], and then discovering that it doesn't actually work on Windows at all. (Couldn't this critical information be included somewhere prominent on Hackage??)
This critical information should be provided on each package page on Hackage. It's not quite as trivial as it looks however.
If you'd like to help out, we're working on a new hackage-server that allows users to upload build reports. That way we hope to discover automatically which packages do and do not build on various platforms. The basics work but we need more help in polishing it up.
Do you know buildbot? http://buildbot.net/trac
Yeah, it's great for some kinds of projects. For example it's used for ghc. However it is very centralised, synchronous and needs ssh on Windows. What we've implemented is using cabal-install to generate build logs and summary info and to upload that to the hackage server. The advantage is that we should get an order or two magnitude more results than if we used a handful of buildbots. It also means we do not have to administer the buildbots, people can administer their own cabal-install setups. We don't need to care so much about individual results if we have enough results. We plan to have two reporting modes, anonymous with minimal info, and non-anonymous with full build logs. So far we've got both but have not separated them yet. Duncan

Would be nice if after a failed build cabal asked whether or not to
upload its log immediately, and (on the hackage side) this led to an
email being sent to the maintainer.
2009/1/15 Duncan Coutts
On Thu, 2009-01-15 at 00:22 +0100, Manlio Perillo wrote:
Duncan Coutts ha scritto:
On Tue, 2009-01-13 at 19:20 +0000, Andrew Coppin wrote:
I vividle remember Dons repeatedly telling me that I should try out [some package who's name escapes me], and then discovering that it doesn't actually work on Windows at all. (Couldn't this critical information be included somewhere prominent on Hackage??)
This critical information should be provided on each package page on Hackage. It's not quite as trivial as it looks however.
If you'd like to help out, we're working on a new hackage-server that allows users to upload build reports. That way we hope to discover automatically which packages do and do not build on various platforms. The basics work but we need more help in polishing it up.
Do you know buildbot? http://buildbot.net/trac
Yeah, it's great for some kinds of projects. For example it's used for ghc. However it is very centralised, synchronous and needs ssh on Windows.
What we've implemented is using cabal-install to generate build logs and summary info and to upload that to the hackage server. The advantage is that we should get an order or two magnitude more results than if we used a handful of buildbots. It also means we do not have to administer the buildbots, people can administer their own cabal-install setups. We don't need to care so much about individual results if we have enough results.
We plan to have two reporting modes, anonymous with minimal info, and non-anonymous with full build logs. So far we've got both but have not separated them yet.
Duncan
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Евгений Кирпичев Разработчик Яндекс.Маркета

On Thu, 2009-01-15 at 09:49 +0300, Eugene Kirpichov wrote:
Would be nice if after a failed build cabal asked whether or not to upload its log immediately, and (on the hackage side) this led to an email being sent to the maintainer.
It should not be quite that synchronous but yes that's the general idea. Packages can fail to install for many reasons that are not the fault of the package author, for example missing C libraries. Also, I think maintainers would not be pleased to receive 10's of emails per day! :-) I think in practise it will have to be opt-in for package authors/maintainers and it should only send aggregated information (like "it appears not to work on windows with ghc-6.8"). Duncan

Well, I thought about these 10's of emails too; probably hackage could
send an email when a new broken build arrives but only if there were
no 'unresolved' broken builds before this one; or probably an email at
the first broken build and a weekly email reminding "you've got some
unresolved broken builds".
As for missing C libraries: could cabal probably integrate with the
native package manager (apt/rpm/..) and ask the user whether to invoke
it to install these libraries in case they are missing? However, this
is not a solution for Windows since there's no native package manager.
An easier solution might be to add a (flag-dependent)
"broken-build-message" field to .cabal files, where authors could put
useful info to be printed when a build breaks, like, "have you
installed libpcre?" or "please see troubleshooting.txt".
/me promises to do some cabal tickets from the 'easy ticket list'
after the last exam
2009/1/15 Duncan Coutts
On Thu, 2009-01-15 at 09:49 +0300, Eugene Kirpichov wrote:
Would be nice if after a failed build cabal asked whether or not to upload its log immediately, and (on the hackage side) this led to an email being sent to the maintainer.
It should not be quite that synchronous but yes that's the general idea.
Packages can fail to install for many reasons that are not the fault of the package author, for example missing C libraries. Also, I think maintainers would not be pleased to receive 10's of emails per day! :-) I think in practise it will have to be opt-in for package authors/maintainers and it should only send aggregated information (like "it appears not to work on windows with ghc-6.8").
Duncan

Eugene Kirpichov ha scritto:
Well, I thought about these 10's of emails too; probably hackage could send an email when a new broken build arrives but only if there were no 'unresolved' broken builds before this one; or probably an email at the first broken build and a weekly email reminding "you've got some unresolved broken builds".
As for missing C libraries: could cabal probably integrate with the native package manager (apt/rpm/..) and ask the user whether to invoke it to install these libraries in case they are missing?
I like the idea. An "external package" database, where for each "software" we have an Haskell name, with this name mapped to each specific package.
However, this is not a solution for Windows since there's no native package manager.
For windows an "Haskell external package" name can be mapped to an URL to a "well know" Windows installer.
[...]
Manlio Perillo

Duncan Coutts
On Thu, 2009-01-15 at 09:49 +0300, Eugene Kirpichov wrote:
Would be nice if after a failed build cabal asked whether or not to upload its log immediately, and (on the hackage side) this led to an email being sent to the maintainer.
It should not be quite that synchronous but yes that's the general idea.
Perhaps the maintainer should receive a build summary at regular intervals? This would also work as a check whether there is a live maintainer at the other end of the listed maintainer address. (And hopefully be enough of an annoyance on the libraries@ list that people would start looking for maintainers for orphaned packages :-) -k -- If I haven't seen further, it is by standing in the footprints of giants

On Thu, 2009-01-15 at 14:25 +0100, Ketil Malde wrote:
Duncan Coutts
writes: On Thu, 2009-01-15 at 09:49 +0300, Eugene Kirpichov wrote:
Would be nice if after a failed build cabal asked whether or not to upload its log immediately, and (on the hackage side) this led to an email being sent to the maintainer.
It should not be quite that synchronous but yes that's the general idea.
Perhaps the maintainer should receive a build summary at regular intervals? This would also work as a check whether there is a live maintainer at the other end of the listed maintainer address. (And hopefully be enough of an annoyance on the libraries@ list that people would start looking for maintainers for orphaned packages :-)
It may well be tempting to plague maintainers until they fix their packages however in practise it will not work. We want a low barrier to entry for packages on hackage and we do not want to annoy package maintainers to the point where they decide to stop using hackage at all. Of course we also want to measure package quality. The approach I've always advocated is to define subsets of hackage that do meet higher quality levels. Be defining such subsets and holding them up as being a "good thing" in the community then it puts social pressure on maintainers to have their packages in those higher quality subsets. Then to help them do that they may choose to opt-in to various services like receiving a build summary at regular intervals. So it's the same goal but without the stick. Duncan

Duncan Coutts
Perhaps the maintainer should receive a build summary at regular intervals? This would also work as a check whether there is a live maintainer at the other end of the listed maintainer address. (And hopefully be enough of an annoyance on the libraries@ list that people would start looking for maintainers for orphaned packages :-)
It may well be tempting to plague maintainers
Hey, I only want to plague the libraries@ list, which is subscriber-only, and therefore serves to prevent bug reports from reaching anybody. I'd actually *like* to have reports on build failures on stuff I'm responsible for, as long as there's some sensible rate limiting. Perhaps a maintainer-selected interval could be an option? -k -- If I haven't seen further, it is by standing in the footprints of giants

Duncan Coutts wrote:
It may well be tempting to plague maintainers until they fix their packages however in practise it will not work. We want a low barrier to entry for packages on hackage and we do not want to annoy package maintainers to the point where they decide to stop using hackage at all.
+1. As a package maintainer, I love to get feedback (especially when things are broken) but I don't like being harassed. I get lots of email from all over and in order to make sure the most important things are seen soonest, routine email from bots often finds its way into filtering and rerouting... which means, whether intended or not, it often gets ignored or overlooked. After a decade or so in this game, one of the big tricks with project management (and kid yourself not, this *is* PM what Duncan et al. are so kind to take on for us) is how to balance interaction between the developers, the managers, and the clientele. The biggest trick is in that key word: interaction. When people feel put upon, ignored, or talked at (instead of talked to) then they're not interacting, not communicating, not being a part of the community. And when people aren't communicating they feel unappreciated. In the F/OSS world that means they stop contributing. Just like with friendships, jobs, and life in general, it takes a lot more work to find new developers than it does to keep the ones you have. Since life happens and you can't stop entropy, that means in turn that barriers to entry must be as low as is reasonable[1]. One of the things I've always liked about Hackage is how low the barriers are. I've also been a CPAN developer for many years, but I haven't released as much Perl code as Haskell code because it takes more work to publish a CPAN module than it does to publish a Hackage package. (Even after having accounts in both systems, of which again Hackage is easier.) Rather than just being a stick in the mud, here are some suggestions for what I, as a developer, would like to see in Hackage/Cabal/FooBlatz's future. First, I would like (via opt-in) to get periodic aggregated notice about failed builds. The simplest version of this would be sending out emails when the HackageDB build fails, rather than needing to remember to check back a while after uploading a new version. It would be nice to extend this to collect cabal-install failures, though that can get tricky about how not to harass the clientele. Minimally these aggregated reports should indicate the package and version, the problem, the Haskell compiler and its version, as well as the OS. Since some packages have many dependencies or make heavy use of the FFI, CPP, or have architecture dependent differences, it would be nice to be able to set per-package preferences to get additional information like OS version, dependency versions, CPU info, build logs, etc. Since it can be hard to set up sandboxes for every configuration, it'd also be nice if clients could opt in to send contact email as well, if they're willing to back-and-forth with the developer to fix things in the event of bugs. Second, and this would take more work, I would like it if the Haddock documentation for packages could be given a wiki-like and/or reddit-like interface so that people could make comments about what is unclear or needs better documentation as well as offering spelling/grammar/punctuation suggestions[2]. Viewers should be able to set preferences for whether they want to see the real/current documentation, or whether they want to see the commented/modified version (hiding things below a certain depth or rank for reddit-like). While building errors are an obvious point of failure, we know the design space and just need to find an elegant minimalistic solution there. I think the documentation problem is just as important a point of failure, if not more so because it is discussed less often. The solution here is harder since the design space hasn't been so thoroughly charted by previous languages. But given the very community-oriented nature of Haskell programming, it's a shame that we don't yet have a community-oriented solution to the documentation problem. The big trick will be how to both segregate and integrate community feedback and the official documentation (which should always be under the maintainer's control, hence the wiki/reddit should also be opt-in), in addition to issues about how package versioning interacts with the comments. At the same time, like QuickCheck, this strikes me as a ripe domain for "killer app" breakthroughs. Perhaps one of the folks working on wiki and web development tools in Haskell would like to make a name for themselves? [1] Which does not mean as low as is possible. When the barriers are too low the community can expand too quickly for the leaders to keep things functioning smoothly and cohesively. Just as with biology and finance, these population booms are just as quickly followed by busts and starvation, the damage of which has a momentum all its own. The greater community's embitterment toward the busted one raises the barriers to entry quite high, and often this retaliation does not wane for a very long time. [2] For wiki edits to the documentation (as opposed to reddit comments), maintainers should be able to get a darcs (or diff) patch against the release version of the source code, as desired. This alleviates the forking problem which could inhibit importing changes from the wiki back into the source.
Of course we also want to measure package quality. The approach I've always advocated is to define subsets of hackage that do meet higher quality levels. Be defining such subsets and holding them up as being a "good thing" in the community then it puts social pressure on maintainers to have their packages in those higher quality subsets. Then to help them do that they may choose to opt-in to various services like receiving a build summary at regular intervals.
So it's the same goal but without the stick.
I like this approach as well. As I said, we Haskellers are very community driven and the social pressure towards perfectionism is already strong. Stick-based approaches are very anti-social. (And if you think about it, they're very imperative too. Whereas modeling high-quality work is much more declarative. Hmm...) -- Live well, ~wren

Interesting and thoughtful, thanks. I think we need to file these ideas in the hackage trac. They've been floating about for a while but we need to get them properly recorded. On Sun, 2009-01-18 at 01:06 -0500, wren ng thornton wrote:
Minimally these aggregated reports should indicate the package and version, the problem, the Haskell compiler and its version, as well as the OS. Since some packages have many dependencies or make heavy use of the FFI, CPP, or have architecture dependent differences, it would be nice to be able to set per-package preferences to get additional information like OS version, dependency versions, CPU info, build logs, etc.
The information we would collect for anonymous reports would be just: package: HTTP-4000.0.2 os: linux arch: x86_64 compiler: ghc-6.10.1 client: cabal-install-0.6.1 flags: -old-base dependencies: array-0.2.0.0 base-3.0.3.0 bytestring-0.9.1.5 mtl-1.1.0.2 network-2.2.0.1 parsec-2.1.0.1 install-outcome: InstallOk docs-outcome: NotTried tests-outcome: NotTried This is all machine readable of course so we can aggregate information from 1000s of reports.
Since it can be hard to set up sandboxes for every configuration, it'd also be nice if clients could opt in to send contact email as well, if they're willing to back-and-forth with the developer to fix things in the event of bugs.
Non-anonymous reports with build logs will have to be associated with registered accounts. I expect that would provide a way to get in touch with some testers. Some of the testers of course will just be automated build clients.
Second, and this would take more work, I would like it if the Haddock documentation for packages could be given a wiki-like and/or reddit-like interface so that people could make comments about what is unclear or needs better documentation as well as offering spelling/grammar/punctuation suggestions[2]. Viewers should be able to set preferences for whether they want to see the real/current documentation, or whether they want to see the commented/modified version (hiding things below a certain depth or rank for reddit-like).
We had a thread on this the other day with similar ideas. Duncan

2009/1/18 Duncan Coutts
Second, and this would take more work, I would like it if the Haddock documentation for packages could be given a wiki-like and/or reddit-like interface so that people could make comments about what is unclear or needs better documentation as well as offering spelling/grammar/punctuation suggestions[2]. Viewers should be able to set preferences for whether they want to see the real/current documentation, or whether they want to see the commented/modified version (hiding things below a certain depth or rank for reddit-like).
We had a thread on this the other day with similar ideas.
It might not count as a summary, since I'm not sure I've read all of the discussion, but I added a ticket describing this type of system here: http://trac.haskell.org/haddock/ticket/72 If something is missing, please add it, and feel free to post more thoughts. David

Duncan Coutts ha scritto:
[...]
Do you know buildbot? http://buildbot.net/trac
Yeah, it's great for some kinds of projects. For example it's used for ghc. However it is very centralised, synchronous and needs ssh on Windows.
What we've implemented is using cabal-install to generate build logs and summary info and to upload that to the hackage server. The advantage is that we should get an order or two magnitude more results than if we used a handful of buildbots.
This seems a good idea. However, it is possible for a thirdy part user to submit build logs for a specific platform? In detail: - The package author submit his package, and additional build logs for each platform he have access to - Other users can submit additional build logs for their platform I think, however, that a centralized system has its advantages. As an example, a newly submitted package can be put in a 'incoming queue', and moved to the final destination only if it builds (and tests succeed) on all the supported platforms.
[..]
Manlio Perillo

On Thu, 2009-01-15 at 12:45 +0100, Manlio Perillo wrote:
Duncan Coutts ha scritto:
[...]
Do you know buildbot? http://buildbot.net/trac
Yeah, it's great for some kinds of projects. For example it's used for ghc. However it is very centralised, synchronous and needs ssh on Windows.
What we've implemented is using cabal-install to generate build logs and summary info and to upload that to the hackage server. The advantage is that we should get an order or two magnitude more results than if we used a handful of buildbots.
This seems a good idea. However, it is possible for a thirdy part user to submit build logs for a specific platform?
Yes.
In detail: - The package author submit his package, and additional build logs for each platform he have access to - Other users can submit additional build logs for their platform
I think, however, that a centralized system has its advantages. As an example, a newly submitted package can be put in a 'incoming queue', and moved to the final destination only if it builds (and tests succeed) on all the supported platforms.
What we really want is both. We want to let random users on random platforms submit simple anonymous build reports (no logs). In addition since any client can upload reports we can set up a number of dedicated clients that will build every new package in a chroot and upload non-anonymous detailed build reports with build logs. The only downside compared to a more centralised system is that we do not get to centrally monitor the status of the dedicated build clients. Duncan

Duncan Coutts ha scritto:
[...]
This seems a good idea. However, it is possible for a thirdy part user to submit build logs for a specific platform?
Yes.
Ok, that's great!
In detail: - The package author submit his package, and additional build logs for each platform he have access to - Other users can submit additional build logs for their platform
I think, however, that a centralized system has its advantages. As an example, a newly submitted package can be put in a 'incoming queue', and moved to the final destination only if it builds (and tests succeed) on all the supported platforms.
What we really want is both. We want to let random users on random platforms submit simple anonymous build reports (no logs).
In addition since any client can upload reports we can set up a number of dedicated clients that will build every new package in a chroot and upload non-anonymous detailed build reports with build logs.
Since nowdays virtual machines are very affordable, it would be nice to have a set of standard virtual system images, preconfigured to run Cabal installation process. So that when I compile a package on my system, Cabal can be instructed to: 1) Start each virtual machine on the system 2) Submit the package to each machine an get the report 3) Stop each virtual machine Is this a feasible task? The only "problem" is with proprietary operating systems like Windows and Mac OS, where pre-configured systems can not be provided.
[...]
Manlio Perillo

On Thu, 2009-01-15 at 13:26 +0100, Manlio Perillo wrote:
In detail: - The package author submit his package, and additional build logs for each platform he have access to - Other users can submit additional build logs for their platform
I think, however, that a centralized system has its advantages. As an example, a newly submitted package can be put in a 'incoming queue', and moved to the final destination only if it builds (and tests succeed) on all the supported platforms.
What we really want is both. We want to let random users on random platforms submit simple anonymous build reports (no logs).
In addition since any client can upload reports we can set up a number of dedicated clients that will build every new package in a chroot and upload non-anonymous detailed build reports with build logs.
Since nowdays virtual machines are very affordable, it would be nice to have a set of standard virtual system images, preconfigured to run Cabal installation process.
So that when I compile a package on my system, Cabal can be instructed to: 1) Start each virtual machine on the system 2) Submit the package to each machine an get the report 3) Stop each virtual machine
Is this a feasible task?
Yes, and the great thing is that anyone could do that. That's the advantage of a decentralised system. It does not require the permission or help of the cabal/hackage hackers to do it.
The only "problem" is with proprietary operating systems like Windows and Mac OS, where pre-configured systems can not be provided.
True. The other issue is that perhaps knowing something builds on a clean virtual machine is not quite so useful as knowing it builds on 100's of messy machines in dozens of different configurations. So that's not to say that using dedicated build clients running on virtual machines is not useful, it is. But we don't need lots and lots of those. Duncan

Duncan Coutts wrote:
We want to let random users on random platforms submit simple anonymous build reports (no logs)... The only downside compared to a more centralised system is that we do not get to centrally monitor the status of the dedicated build clients.
And that we open ourselves up to some serious security concerns - like hostile build reports and DOS. -Yitz

Yitzchak Gale ha scritto:
Duncan Coutts wrote:
We want to let random users on random platforms submit simple anonymous build reports (no logs)... The only downside compared to a more centralised system is that we do not get to centrally monitor the status of the dedicated build clients.
And that we open ourselves up to some serious security concerns - like hostile build reports and DOS.
DOS is always a problem, for every application open to the Internet. As for hostile builds reports, I don't see it as a security concern.
-Yitz
Manlio Perillo

Duncan Coutts wrote:
let random users... submit... build reports...
I wrote:
...we open ourselves up to... hostile build reports and DOS.
Manlio Perillo wrote:
DOS is always a problem, for every application open to the Internet.
Yes. But I didn't mean just generic flooding. I meant abusing the effect of build reports to create a DOS.
As for hostile builds reports, I don't see it as a security concern.
Hostile build reports could effectively remove a package from hackage. Or bless a faulty package, causing problems on other people's systems. -Yitz

On Thu, 2009-01-15 at 14:38 +0200, Yitzchak Gale wrote:
Duncan Coutts wrote:
We want to let random users on random platforms submit simple anonymous build reports (no logs)... The only downside compared to a more centralised system is that we do not get to centrally monitor the status of the dedicated build clients.
And that we open ourselves up to some serious security concerns - like hostile build reports and DOS.
Detailed build reports with logs are not anonymous, clients will need an account on hackage (ie username and password). Yes, we could get flooded with anonymous build reports, but they're much smaller and hopefully they'll either be obviously bogus or drowned out by the volume of legit reports. So the information content and reliability of each data item is lower but hopefully the volume makes up for it, so long as we do the statistics carefully. As Manlio says, we're always open to DOS attacks. We just have to make sure we're not more vulnerable than average by doing too much work on the server side compared to the work done by the client (ie the processing of anonymous reports has to be fairly cheap). Duncan

Duncan Coutts wrote:
Detailed build reports with logs are not anonymous, clients will need an account on hackage (ie username and password).
Right. If we experience problems with that in the future, we just have to make sure that it won't be too hard to set up captcha.
they'll either be obviously bogus
Aren't we talking about an automated system? If we don't explicitly design for the possibility of hostile reports, any automated recognition will be trivial to circumvent.
or drowned out by the volume of legit reports.
Again, if this is automated, it is trivial generate the required volume. -Yitz

There's no point wasting development resources on threats that may never emerge. If attacks become a problem, it can be dealt with then -- when more information on the nature of the threat is available, so a better solution can be developed than now (when there is no information, only speculation). We're not talking about an airline control system here, where waste is more than acceptable if it trivially reduces risk. Regards, John On Jan 15, 2009, at 6:38 AM, Yitzchak Gale wrote:
Duncan Coutts wrote:
Detailed build reports with logs are not anonymous, clients will need an account on hackage (ie username and password).
Right. If we experience problems with that in the future, we just have to make sure that it won't be too hard to set up captcha.
they'll either be obviously bogus
Aren't we talking about an automated system? If we don't explicitly design for the possibility of hostile reports, any automated recognition will be trivial to circumvent.
or drowned out by the volume of legit reports.
Again, if this is automated, it is trivial generate the required volume.
-Yitz _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Tue, 2009-01-13 at 16:33 +0100, Regis Saint-Paul wrote:
Hi,
I’ve seen many times the monad topic coming around on the cafe and plentiful tutorials on monads have been published. However, as a complete Haskell newbie coming from OOP, I felt monads were not particularly difficult to grasp, and very exciting to work with.
During my experiments with Haskell so far, the main problems I kept bumping into were not related to the language but to its libraries: their compilation and installation. Unfortunately, this topic has not received nearly as much attention. I was unable to find a comprehensive tutorial on how to deal with the variety of problems I get when trying to install Hackage packages. This turned out to be (and still is) THE main source of wasted time and headaches. And worse, unlike type problems, these are not interesting ones to solve.
You're right, we've only been actively working on this for the last couple years. The tools are not yet as good as we would like them to be. Unfortunately as you say the problem does not interest a lot of people. So it is "good enough" for lots of people and we do not have quite enough people working on the package infrastructure to make it really great as quickly as we'd like. Of course it's not for lack of ideas or suggestions, we've got a huge TODO list! :-) Let me add a plug for our resources for new Cabal hackers: http://hackage.haskell.org/trac/hackage/ There's a source code guide, an "easy ticket" list, a link to the development mailing list and instructions on how to get the code. New hackers are most welcome! :-)
Thus, as a beginner, the package management is what is really getting in the way of switching to Haskell--not the language. Even books like Real World Haskell (otherwise excellent) ignore entirely the topic.
In fairness I think it does mention Cabal and cabal-install. But it does not go into a lot of detail I admit. At the time they were writing that cabal-install had only just got to the stage of being usable (the authors had to slightly make a guess as to whether this "cabal-install" thing was going to become popular). It's still pretty young software.
Cabal and Cabal-install are clearly wonderful applications that make installing most packages very straightforward.
Phew! That's a big improvement. It used to be universally hard to install packages, and there were many fewer packages around because they used to be so hard to make.
Unfortunately, whenever this "standard" method for package installation fails (or when it is not available as with, e.g., gtk2hs), I find myself in complete disarray.
Yes, that is a serious problem.
Below are some of the questions and issues I faced regarding package management:
- For a number of packages, cabal-install gets stuck and has to be killed.
Assuming you are using the latest version (0.6.0) this should never happen. If it does please report bugs with details on how to reproduce the problem. I'm the maintainer of Cabal so email me or add tickets in our bug tracker: http://hackage.haskell.org/trac/hackage/ If it gets stuck building the package then that's a slightly different issue. Either way, more information would help in diagnosing what is going on. It is certainly not expected behaviour.
I assume this is due to some difficulties in solving the dependencies and it is fine, not all can be automated and cabal-install is not responsible for poor packages. But the question then becomes what to do from there? Is their some method to solve dependencies? How should we proceed to "debug" a package installation? How do gurus deal with that? (maybe some less known command line arguments? Or ways to figure out the problem and work out its solution (cabal-install is silent in such case)? In particular, how to know why did cabal get stuck in the first place?
cabal install --dry-run -v This produces quite a bit of information about what the dependency resolver is doing, especially in the latest version. I've not had the situation where it sometimes fails to terminate. The only infinite loop bug it has ever had (as far as I am aware) is when cabal-install version 0.5.x is used with ghc-6.10. In that case it always fails to terminate, it does not matter what package. So like I said, if you are getting non-termination in the solver we need more details. What does happen sometimes is that the solver cannont find a solution. In this case you can look at the error message and perhaps the output of --dry-run -v and try adding constraints to give it some help on what versions of packages to pick, for example: cabal install --dry-run -v 'foo < 2' 'bar == 1.2.0'
- Some packages on Hackage are reported as not building successfully with GHC6.10 (e.g., encoding) while others do not build with 6.8 (e.g., salvia) and the later might depend on the former...What is one supposed to do in such case?
Note that the hackage build results are not very accurate at the moment. They can fail for a number of reasons that would not prevent you from making it work on your own machine. If the package really does not build with the version of ghc you have then either try a different version of the package (in the case that the latest one works with ghv 6.10 but you want to use ghc 6.8). You may of course find packages that need patching before they will work with 6.10. In such cases if you cannot patch them yourself then email the maintainer and tell them that you would like to use it with 6.10. There are still quite a few of these about.
For example, is it an appropriate way to proceed to compile a package with one version of GHC and then use the compiled package with another version of GHC? Is it safe? What could possibly go wrong?
It will not work. For one thing it would be hard to try and get into that situation since the package databases are different for each ghc version. If you managed to hack it anyway then ghc will detect that you used a different version to build the other package and refuse to compile against it.
If it is the right way to go, how should we setup the two GHC versions? For instance,should we have a shared package configuration file and choose through the path which GHC is used or is there nicer way to set this up?
It is perfectly possible to have multiple versions of ghc installed. I've got 4 versions. Each has an independent set of libraries however. By default ghc installs into a versioned lib directory and the binaries are versioned too, so 'ghc' on the $PATH will refer to the ghc version you installed most recently and use ghc-x.y for specific versions.
- Taking for example the "encoding" package on Hackage. Last time I tried, the log was saying it fails to build on GHC 6.10, however, looking inside this Hackage log, I could see a successful compilation using "preferred versions". So it looks as if the thing can be compiled somehow. What should one do with this information?
cabal-install uses it automatically, at least if you're using the latest version (0.6.0).
If cabal manages to compile it using this method on Hackage, then isn't cabal install just doing it on my disk?
Yes.
Is it possible through some command line? Is it possible manually (without cabal-install) and, if so, how? (I tried to copy-past the build instruction as it appeared on the log...that somehow compiled, but then, I failed to figure out how to install...)
It sounds like you're using an older version. It works fine for me here using cabal-install-0.6.0.
- I’m primarily a windows user and lots of my initial struggles probably came from that. After many difficulties, I figured out that installing MinGW and MSys was *THE* way to get a bit more of the things working. First, a lot of time would be saved by just saying clearly on the GHC download page that MinGW and MSys are mandatory installation (or even package that with GHC for the windows distribution if license allows, who cares the extra few Mb). Even if that is not technically exact, i.e., even if ghci and many trivial command line programs can work without, MSys and MinGW turn out to be quiet necessary whenever trying to install anything producing side effect.
They should only be needed for packages that use ./configure scripts. Perhaps that applies to all the ones you were trying.
Making it plain that these two are necessary would real come has a great time savers for newbie like me on windows (personal opinion of course). Or, if another path exists to go without these two, I'd be very glad to learn. Besides, even these tools basic installation is not enough, you need automake and various things of the like. That makes me wonder if the most precious skill for programming with Haskell would not be a strong C/C++ programming background.
These should not be necessary unless you are modifying packages that use ./configure scripts. Just to build them it is not necessary. To be honest I've never got autoconf or automake to work on MinGW/MSYS. I always generate the tarballs on linux and build them on windows (eg for building the gtk2hs windows installers)
- In face of the difficulties with windows, I switched to Linux. While some things worked better, there were still lots of difficulties with package compilation. For instance, it is very difficult to figure out which Linux packages of a given distribution are needed for compiling this or that package. Again, gtk2hs is epitome here: which C development packages are needed to compile it is obscure at best (cairo, codeview, etc...). I ended up querying the Debian package management with any keyword found after running gtk2hs and randomly installing all the dev packages...
That's a reasonable strategy. Or using native gtk2hs packages if they are available for your system (I think the debian gtk2hs packages are a bit older than the current gtk2hs release but probably still usable.)
And when gtk2hs finally compiled, it failed to install anyway. As of today, I’ve never been able to compile even the dumbest demo using gtk2hs whether on linux or on windows and whether using ghc 6.8.3 or 6.10.1.
The released version should work with ghc-6.8.x. Perhaps ask for help on the gtk2hs-users mailing list. The last release came out before ghc-6.10 and do not work with it. The development version works with 6.10 and we're expecting a new release any time.
On windows, the automated setup install worked but did not allow me to compile with codeview and I still do not know how to add codeview to the install packages.
No, the windows installer does not include the sourceview package because it requires many many more C libraries and we decided it was not worth it for most users. Again feel free to ask on the gtk2hs-users list. If people do want it and don't mind the bigger download then it's doable.
Trust that I tried hard and read the docs thoroughly. Gtk2hs is just on of many examples; I had problems under Linux also with, e.g., Happs, yi, database things, etc. and figured out that the situation was roughly identical to windows with MSys and MinGW. So Linux appears not to be the right solution here. Maybe it's just that Linux users are more experienced with the GNU C/C++ libraries...but it won't help a windows user to switch to Linux since this knowledge can't be built out of thin air.
Partly it is familiarity and partly it is the fact that hackage is a 'live' collection of the latest version of everything. It is not a packaged collection of stuff that has been tested together. So there really are many packages that will be hard to get to work with whatever versions of other things you've got. It's a situation we are trying to improve by improved reporting and information on the hackage website. We're also building a "haskell platform" which is a collection of packages that have been tested together on several different operating systems.
- Would there be some binary version of cabal targeting various OSs? I believe the Haskell platform project is about that.
Yes exactly.
But without waiting for a fair and objective selection of the packages (it seems to be the current status of the project), I’d be happy working with some authoritative bundle produced by a Haskell guru and would trust his subjective choices (who am I to question these choices anyway). Or even an image (e.g., virtual box or Xen) of a fully setup development environment since there are so many dependencies involved in, e.g., simply compiling GHC...
It sounds like you're describing the platform project. Hopefully that will not be too long a wait.
Now, one might argue that these are not Haskell problems, that they are normal when dealing with non-mature packages. So let me explain why I've been trying hard to install these packages:
As a beginner with no experience with emacs, I tried to find some IDE-like environment which would, at least, save me from manually reloading files in ghci or help me browse the source files. Following the Haskellwiki advice, that led to trying out Yi, Leksah, eclipsefp, or a Visual Studio extension. To this date, NOT ANY SINGLE ONE of these worked, be it on Linux or Windows. I had to resort to learning emacs which seems the only sensible choice available today.
No, none of them are mature. Most people are using ordinary editors with Haskell modes and manually reloading files in ghci.
I am particularly unskilled, no question here. But, would a charitable soul take the pain of writing a comprehensive package management tutorial instead of a monad one, (s)he would have my deepest gratitude :)
Yes if we could find someone to help us improve the documentation for using cabal that would be brilliant. We've got a lot of information in the cabal user guide but I get the feeling it is not very accessible. Also it does not cover hackage. Personally I find it very hard to document broken stuff. I prefer to spend that time fixing things. I realise that's not very helpful. As I said, we could do with some help in this area.
Apologies for the long mail.
Thanks for the feedback. It makes it clear how much work we have yet to do to make this process smoother for new users.
P.S. People on #haskell are wonderful. They helped me solve many issues. Unfortunately, solving specific instances of problem did not contribute much to a deeper understanding of the internal working. I find myself randomly trying things without knowing which would work or why; Hence this plea for a tutorial.
participants (20)
-
Andrew Coppin
-
Andrew Wagner
-
David Waern
-
Don Stewart
-
Duncan Coutts
-
Erik de Castro Lopo
-
Eugene Kirpichov
-
Gregory Collins
-
Jamie Brandon
-
John A. De Goes
-
Ketil Malde
-
Krzysztof Skrzętnicki
-
Magnus Therning
-
Manlio Perillo
-
Mauricio
-
Peter Verswyvelen
-
Regis Saint-Paul
-
Simon Marlow
-
wren ng thornton
-
Yitzchak Gale