Re: [Haskell-cafe] cabal: internal error when reading package index

2013-09-18 Thread Ivan Lazar Miljenovic
On 18 September 2013 19:23, Henk-Jan van Tuyl hjgt...@chello.nl wrote:

 L.S.,

 I was trying to install a package from a local drive and got the following
 message:
   cabal install
   Resolving dependencies...
   cabal: internal error when reading package index: could not read tar file
   entryThe package index or index cache is probably corrupt. Running cabal
   update might fix it.

 Then I tried cabal update:
   cabal update
   Downloading the latest package list from hackage.haskell.org
   Skipping download: Local and remote files match.
   Note: there is a new version of cabal-install available.
   To upgrade, run: cabal install cabal-install

 Trying the command
   cabal install cabal-install
 gave the same internal error message as for the first command.

 What can I do about this?

Maybe try deleting the current download?  Namely
~/.cabal/packages/hackage.haskell.org/00-index.*


 Regards,
 Henk-Jan van Tuyl


 --
 Folding@home
 What if you could share your unused computer power to help find a cure? In
 just 5 minutes you can join the world's biggest networked computer and get
 us closer sooner. Watch the video.
 http://folding.stanford.edu/


 http://Van.Tuyl.eu/
 http://members.chello.nl/hjgtuyl/tourdemonad.html
 Haskell programming
 --
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe



-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
http://IvanMiljenovic.wordpress.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal --enable-tests

2013-09-09 Thread Johan Tibell
I don't think so. Perhaps we should set one. What's your use case? Perhaps
you could describe it in a new bug report at
https://github.com/haskell/cabal/issues


On Mon, Sep 9, 2013 at 7:29 PM, satvik chauhan mystic.sat...@gmail.comwrote:

 Hi cafe,


 I wanted to ask this as I couldn't find this in cabal documentation.

 Is there any CCP macro set when a package is configured with
 --enable-testing? If not is there a way to do that?

 -Satvik

 ___
 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


Re: [Haskell-cafe] cabal-dev: installing/running with profiling enabled

2013-07-02 Thread Ömer Sinan Ağacan
Hi Rogan,

Thanks for your reply.

 I don'th think the -prof flag is necessary; but if it is, then it may also
 be misinterpreted by cabal-dev; generally, you need to pass flags that only
 use a single leading - to cabal-dev with the --flags=... option. (eg:
 'cabal-dev install --enable-library-profiling --enable-executable-profiling
 --flags=-prof'


 This command worked for me:

 $ cabal-dev install --enable-library-profiling --enable-executable-profiling

OK, so I removed `cabal-dev` directory, and installed again with this
command. But it still failed with same error message(the flag -p
requires the program to be built with -prof).

Then I also tried removing cabal-dev again and installing again but
this time with extra `--flags=-prof` parameter. Failed with same
error.

Just to be sure I created a new cabal project with only one file:
'Hello.hs' with contents 'main = putStrLn hello' and tried to
install it with cabal-dev. And `./cabal-dev-/bin/Hello +RTS -p` failed
with same error again.

Maybe something wrong with my system? My first thought was maybe
cabal-dev is using some pre-installed library, and it's not
recompiling the whole world for each sandbox. But I don't know how to
check this.

Any ideas on that?

Thanks,

---
Ömer Sinan Ağacan
http://osa1.net

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-dev: installing/running with profiling enabled

2013-07-02 Thread Tristan Ravitch
On Tue, Jul 02, 2013 at 09:07:18AM +0300, Ömer Sinan Ağacan wrote:
 OK, so I removed `cabal-dev` directory, and installed again with this
 command. But it still failed with same error message(the flag -p
 requires the program to be built with -prof).


Maybe you are running into this:

  https://github.com/haskell/cabal/issues/1199

Check your version of the Cabal library (cabal --version should tell
you).  I think this was only broken for a few releases, but I don't
remember which ones.


pgp4n6mPD4Zps.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-dev: installing/running with profiling enabled

2013-07-02 Thread Ömer Sinan Ağacan
 Maybe you are running into this:

   https://github.com/haskell/cabal/issues/1199

 Check your version of the Cabal library (cabal --version should tell
 you).  I think this was only broken for a few releases, but I don't
 remember which ones.

Great, it worked. I first updated Cabal library (with `cabal install
cabal`) and cabal-install program(`cabal install cabal-install`) and
then reinstalled cabal-dev. Now it works for my hello world program.
Hopefully it will also work with my main program(it's compiling now,
and it will take some time).

Thanks!

---
Ömer Sinan Ağacan
http://osa1.net

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-dev: installing/running with profiling enabled

2013-07-01 Thread Rogan Creswick
Hi Ömer,

I've replied in-line below.

On Mon, Jul 1, 2013 at 2:34 PM, Ömer Sinan Ağacan omeraga...@gmail.comwrote:

 So I tried installing the program in a fresh cabal-dev environment
 with profiling enabled, so that all dependencies would be also
 installed with profiling enabled. But for some reason even after
 installing with `cabal-dev install --enable-executable-profiling
 -prof` I still can't run this program with `caba-dev/bin/program +RTS
 -p`, it fails with 'program: the flag -p requires the program to be
 built with -prof'.


Because you're installing libraries (into the cabal-dev sandbox) you'll
also need to add the --enable-library-profiling flag, in addition to the
--enable-executable-profiling flag.  Cabal-dev could infer the former from
the later, but we haven't done that (this doesn't seem to come up very
often).

I don'th think the -prof flag is necessary; but if it is, then it may also
be misinterpreted by cabal-dev; generally, you need to pass flags that only
use a single leading - to cabal-dev with the --flags=... option. (eg:
'cabal-dev install --enable-library-profiling --enable-executable-profiling
--flags=-prof'


This command worked for me:

$ cabal-dev install --enable-library-profiling --enable-executable-profiling

Note that you must remove the existing cabal-dev sandbox directory before
running that command (or the installed dependencies that were built without
library profiling can cause the build to fail.

--Rogan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal config file Guide

2013-05-26 Thread Albert Y. C. Lai

On 13-05-25 04:52 PM, Daniel Díaz Casanueva wrote:

As you already know, cabal-install is configured in the file config.
It has a lot of fields, but I didn't find a single place where each
field is explained with detail.


There is none, but my new and timely

http://www.vex.net/~trebla/haskell/cabal-cabal.xhtml

talks about a few, and one of them is a real surprise.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-install 1.16.0.2 on Mac

2013-04-11 Thread Brandon Allbery
On Thu, Apr 11, 2013 at 1:19 AM, Richard A. O'Keefe o...@cs.otago.ac.nzwrote:

 On 11/04/2013, at 12:56 PM, Brandon Allbery wrote:
  Xcode 4.2 and on do not use /Developer at all. You have an older Xcode
 on your system somehow, which does not understand newer object files; you
 should remove the entire /Developer tree. (Xcode, in order to be
 distributable via the App Store, is completely self-contained in
 /Applications/Xcode.app.)

 Unfortunately, I cannot.  I _am_ able to install stuff, but uninstalling
 generally gives me problems, and removing /Developer is something I'm not
 allowed to do.


I think you need to discuss that with whoever made that dictum; requiring
that a system be broken is not generally a good idea. Many software
packages will find it and use outdated programs or frameworks as a result.
It really needs to not be there at all.

(Newer Xcode should actually complain and tell you to run the removal
script on startup, because its presence can even break Xcode under some
circumstances.)

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-install 1.16.0.2 on Mac

2013-04-11 Thread Richard A. O'Keefe
The basic problem is that the University has a strict policy
that academic staff must not have root access on any machine
that is connected to the University network.  I was given an
administrator account so that I could resume the printer and
install (some) stuff, but /Developer is owned by root, and I
will be given root access on the Greek Calends.

I would have thought that many organisations would have similar
policies.

On 12/04/2013, at 2:44 AM, Brandon Allbery wrote:
 (Newer Xcode should actually complain and tell you to run the removal script 
 on startup, because its presence can even break Xcode under some 
 circumstances.)

4.6.1 was the latest available in March when I installed it,
and it _didn't_ complain or tell me to run any removal script.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-install 1.16.0.2 on Mac

2013-04-11 Thread Brandon Allbery
On Thu, Apr 11, 2013 at 7:41 PM, Richard A. O'Keefe o...@cs.otago.ac.nzwrote:

 The basic problem is that the University has a strict policy
 that academic staff must not have root access on any machine
 that is connected to the University network.  I was given an
 administrator account so that I could resume the printer and
 install (some) stuff, but /Developer is owned by root, and I
 will be given root access on the Greek Calends.

 I would have thought that many organisations would have similar
 policies.


Well, yes (I was one of those admins, although not at your university, for
many years), but if they are installing machines with both Xcode 4.6 under
/Applications and Xcode 4.1 or earlier under /Developer, they are
installing broken machines that will fail to build many packages and where
Xcode may malfunction. /Developer should not exist on a machine with Xcode
4.2 or later installed, at all. You should contact an administrator about
this and have them fix both installed machines and their installation
images or maintenance routines (whatever they went with for OS X).

sudo /Developer/Library/uninstall-devtools --mode=all

If they need an official reference on this, I can dig up the relevant Apple
knowledge base article.

 On 12/04/2013, at 2:44 AM, Brandon Allbery wrote:
 (Newer Xcode should actually complain and tell you to run the removal
script on startup, because its presence can even break Xcode under some
circumstances.)

 4.6.1 was the latest available in March when I installed it,
 and it _didn't_ complain or tell me to run any removal script.

I have heard that it is sometimes inconsistent about this; sadly, just
because it didn't notice the older version doesn't mean the older version
won't cause breakage. (As you saw.)

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-install 1.16.0.2 on Mac

2013-04-11 Thread Hollister Herhold

On Apr 11, 2013, at 6:53 PM, Brandon Allbery wrote:

  /Developer should not exist on a machine with Xcode 4.2 or later installed, 
 at all. 

Unfortunately this is not completely true - there are some SDKs that still 
install stuff in /Developer (NVIDIA comes to mind) but it's pretty obvious that 
it's not XCode-related. Just because you have /Developer present doesn't mean 
you're harboring an old XCode.



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-install 1.16.0.2 on Mac

2013-04-10 Thread Brandon Allbery
On Wed, Apr 10, 2013 at 8:36 PM, Richard A. O'Keefe o...@cs.otago.ac.nzwrote:

 /Developer/usr/bin/strip: object: /home/cshome/o/ok/.cabal/bin/cabal
 malformed object (unknown load command 15)


Xcode 4.2 and on do not use /Developer at all. You have an older Xcode on
your system somehow, which does not understand newer object files; you
should remove the entire /Developer tree. (Xcode, in order to be
distributable via the App Store, is completely self-contained in
/Applications/Xcode.app.)

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-install 1.16.0.2 on Mac

2013-04-10 Thread Richard A. O'Keefe

On 11/04/2013, at 12:56 PM, Brandon Allbery wrote:
 
 Xcode 4.2 and on do not use /Developer at all. You have an older Xcode on 
 your system somehow, which does not understand newer object files; you should 
 remove the entire /Developer tree. (Xcode, in order to be distributable via 
 the App Store, is completely self-contained in /Applications/Xcode.app.)

Unfortunately, I cannot.  I _am_ able to install stuff, but uninstalling
generally gives me problems, and removing /Developer is something I'm not
allowed to do.

However, putting
/Applications/Xcode.app/Contents/Developer/usr/bin
at the front of my $PATH seems to do the job.

Thanks.



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal install pandoc

2013-04-02 Thread Roger Mason

Hello Albert,

On 04/01/2013 11:41 PM, Albert Y. C. Lai wrote:

On 13-04-01 06:26 AM, Roger Mason wrote:

It turned out that there was a stale version of 'array' lurking in the
ghc package db.  In spite of reinstalling ghc it did not go away until I
unregistered it.  I think it was persisting because re-installing ghc
simply unpacked over the old directory leaving that pre-existing file
intact.


See my http://www.vex.net/~trebla/haskell/sicp.xhtml for how does GHC 
know or not know what libs you have. In particular, it has very little 
to do with files, and clearing GHC is only half the story.


And how to have the same kind of problems recur in the future.
Thank you.  I have read and filed away the article for future 
reference.  I guess the best (least error prone) method of installing 
ghc and packages is to obtain a binary ghc (outside one's package 
manager), build haskell platform and then maintain ghc and packages 
outside the distro package manager.


Comments welcome.

Roger

This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install pandoc

2013-04-01 Thread Roger Mason

Hello Brent,

On 03/31/2013 04:53 PM, Brent Yorgey wrote:

It looks like your entire Haskell Platform installation is completely
hosed.  Sad to say, but I think your best bet is to simply reinstall
the Haskell Platform.

-Brent

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
It turned out that there was a stale version of 'array' lurking in the 
ghc package db.  In spite of reinstalling ghc it did not go away until I 
unregistered it.  I think it was persisting because re-installing ghc 
simply unpacked over the old directory leaving that pre-existing file 
intact.


'ghc-pkg check' shows no errors and I have successfully installed pandoc 
and some other packages.


Roger

This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install pandoc

2013-04-01 Thread Albert Y. C. Lai

On 13-04-01 06:26 AM, Roger Mason wrote:

It turned out that there was a stale version of 'array' lurking in the
ghc package db.  In spite of reinstalling ghc it did not go away until I
unregistered it.  I think it was persisting because re-installing ghc
simply unpacked over the old directory leaving that pre-existing file
intact.


See my http://www.vex.net/~trebla/haskell/sicp.xhtml for how does GHC 
know or not know what libs you have. In particular, it has very little 
to do with files, and clearing GHC is only half the story.


And how to have the same kind of problems recur in the future.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install pandoc

2013-03-31 Thread Brent Yorgey
On Fri, Mar 29, 2013 at 08:05:47AM -0230, Roger Mason wrote:
 Thank you for your response.  'ghc-pkg check' shows some problems:
 
 http://pastebin.ca/2344794
 
 On 03/28/2013 08:01 PM, Patrick Wheeler wrote:
 So I printed off the requirements for pandoc on a empty ghc-7.6.2
 install you can find it at:
 http://hpaste.org/84794
 
 I do not see any odd package versions listed in what you posted so far.
 
 No promise I will be able to help afterwards but it might help to
 see the full log, and then again with verbosity turned on. So
 seperate pastes for:
 
 * `cabal install pandoc --dry-run`
 * `cabal install pandoc --dry-run --verbose=2`
 * `cabal install pandoc --dry-run --verbose=3`
 
 You might also want to run a `ghc-pkg check` to check to see if
 your packages are consistent/unbroken.
 
 
 'ghc-pkg check' shows some problems:
 
 http://pastebin.ca/2344794
 

It looks like your entire Haskell Platform installation is completely
hosed.  Sad to say, but I think your best bet is to simply reinstall
the Haskell Platform.

-Brent

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install pandoc

2013-03-29 Thread Henk-Jan van Tuyl

On Thu, 28 Mar 2013 19:08:46 +0100, Roger Mason rma...@mun.ca wrote:

I installed ghc (7.6.2) on an Arch Linux machine.  I'm trying to install  
pandoc via cabal but it fails:


...
Configuring text-0.11.2.3...
Warning: This package indirectly depends on multiple versions of the same
package. This is highly likely to cause a compile failure.
package deepseq-1.3.0.1 requires array-0.4.0.1
package text-0.11.2.3 requires array-0.4.0.1
Building text-0.11.2.3...
Preprocessing library text-0.11.2.3...
command line: cannot satisfy -package-id  
array-0.4.0.1-db49bb8b0087ae85b5875d4c0cc12874

 (use -v for more information)
Failed to install text-0.11.2.3
...


I had something similar with Ubuntu (before there was a binary package  
available for this platform); I installed several packages, that gave such  
message, again. That solved it.


Regards,
Henk-Jan van Tuyl


--
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install pandoc

2013-03-29 Thread Roger Mason

Thank you for your response.  'ghc-pkg check' shows some problems:

http://pastebin.ca/2344794

On 03/28/2013 08:01 PM, Patrick Wheeler wrote:
So I printed off the requirements for pandoc on a empty ghc-7.6.2 
install you can find it at:

http://hpaste.org/84794

I do not see any odd package versions listed in what you posted so far.

No promise I will be able to help afterwards but it might help to see 
the full log, and then again with verbosity turned on. So seperate 
pastes for:


* `cabal install pandoc --dry-run`
* `cabal install pandoc --dry-run --verbose=2`
* `cabal install pandoc --dry-run --verbose=3`

You might also want to run a `ghc-pkg check` to check to see if your 
packages are consistent/unbroken.




'ghc-pkg check' shows some problems:

http://pastebin.ca/2344794

Thanks for any help you can offer.

Roger

This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install pandoc

2013-03-29 Thread Roger Mason

Hello,

On 03/29/2013 06:47 AM, Henk-Jan van Tuyl wrote:

On Thu, 28 Mar 2013 19:08:46 +0100, Roger Mason rma...@mun.ca wrote:

I installed ghc (7.6.2) on an Arch Linux machine.  I'm trying to 
install pandoc via cabal but it fails:


...
Configuring text-0.11.2.3...
Warning: This package indirectly depends on multiple versions of the 
same

package. This is highly likely to cause a compile failure.
package deepseq-1.3.0.1 requires array-0.4.0.1
package text-0.11.2.3 requires array-0.4.0.1
Building text-0.11.2.3...
Preprocessing library text-0.11.2.3...
command line: cannot satisfy -package-id 
array-0.4.0.1-db49bb8b0087ae85b5875d4c0cc12874

 (use -v for more information)
Failed to install text-0.11.2.3
...


I had something similar with Ubuntu (before there was a binary package 
available for this platform); I installed several packages, that gave 
such message, again. That solved it.


Regards,
Henk-Jan van Tuyl

It appears in my case that cabal may be looking in a strange place for 
installed pacckages.  At least, that is how I interpret the output I 
just pasted here:

http://pastebin.ca/2344794

Thanks,
Roger



This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install pandoc [solved]

2013-03-29 Thread Roger Mason

Hello,

On 03/29/2013 08:13 AM, Roger Mason wrote:

Hello,

It appears in my case that cabal may be looking in a strange place for 
installed pacckages.  At least, that is how I interpret the output I 
just pasted here:

http://pastebin.ca/2344794

Thanks,
Roger
ghc-pkg check showed that there were problems with 'array'. ghc-pkg 
unregister and a fresh installation of ghc and cabal-install have fixed 
the problem.


Thanks to all who responded.

Roger

This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install pandoc

2013-03-28 Thread Mark Fredrickson
To side step the issue, Pandoc is available via the ArchHaskell repos
(package name `haskell-pandoc`):

https://wiki.archlinux.org/index.php/Haskell_package_guidelines

-M
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install pandoc

2013-03-28 Thread Roger Mason

hello,

On 03/28/2013 04:11 PM, Mark Fredrickson wrote:
To side step the issue, Pandoc is available via the ArchHaskell repos 
(package name `haskell-pandoc`):


https://wiki.archlinux.org/index.php/Haskell_package_guidelines

-M


Yes, I know.  I wanted to avoid having a mixture of packages installed 
by pacman and others (not available in the repo) installed using cabal.


Thanks,
Roger

This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install pandoc

2013-03-28 Thread Patrick Wheeler
So I printed off the requirements for pandoc on a empty ghc-7.6.2 install
you can find it at:
http://hpaste.org/84794

I do not see any odd package versions listed in what you posted so far.

No promise I will be able to help afterwards but it might help to see the
full log, and then again with verbosity turned on. So seperate pastes for:

* `cabal install pandoc --dry-run`
* `cabal install pandoc --dry-run --verbose=2`
* `cabal install pandoc --dry-run --verbose=3`

You might also want to run a `ghc-pkg check` to check to see if your
packages are consistent/unbroken.


On Thu, Mar 28, 2013 at 7:52 PM, Roger Mason rma...@mun.ca wrote:

 hello,


 On 03/28/2013 04:11 PM, Mark Fredrickson wrote:

 To side step the issue, Pandoc is available via the ArchHaskell repos
 (package name `haskell-pandoc`):

 https://wiki.archlinux.org/**index.php/Haskell_package_**guidelineshttps://wiki.archlinux.org/index.php/Haskell_package_guidelines

 -M


 Yes, I know.  I wanted to avoid having a mixture of packages installed by
 pacman and others (not available in the repo) installed using cabal.


 Thanks,
 Roger

 This electronic communication is governed by the terms and conditions at
 http://www.mun.ca/cc/policies/**electronic_communications_**
 disclaimer_2012.phphttp://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php

 __**_
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/**mailman/listinfo/haskell-cafehttp://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
Patrick Wheeler
patrick.john.whee...@gmail.com
patrick.j.whee...@rice.edu
patrick.whee...@colorado.edu
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install oddities

2013-03-12 Thread Brandon Allbery
On Tue, Mar 12, 2013 at 3:21 PM, Tycho Andersen ty...@tycho.ws wrote:

 Below is some sample output from a failing package:

 ps168825:~/playground$ cabal install network
 Resolving dependencies...
 Configuring network-2.4.1.2...
 configure: WARNING: unrecognized options: --with-compiler, --with-gcc
 checking build system type... x86_64-unknown-linux-gnu
 checking host system type... x86_64-unknown-linux-gnu
 checking for gcc... gcc
 checking whether the C compiler works... yes
 checking for C compiler default output file name... a.out
 checking for suffix of executables...
 checking whether we are cross compiling... configure: error: in
 `/tmp/network-2.4.1.2-28534/network-2.4.1.2':
 configure: error: cannot run C compiled programs.


cabal install unpacks a package into /tmp in order to build it. My guess
is your OS has /tmp mounted noexec. I don't know offhand how you override
this in cabal.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install oddities

2013-03-12 Thread Tycho Andersen
On Tue, Mar 12, 2013 at 03:28:08PM -0400, Brandon Allbery wrote:

 cabal install unpacks a package into /tmp in order to build it. My guess
 is your OS has /tmp mounted noexec. I don't know offhand how you override
 this in cabal.

Yep, you're exactly right. Thank you! I also couldn't figure out a way
to override it.

\t

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install ghc-mod installs 3 years old version

2013-03-01 Thread Malcolm Wallace
Doesn't Cabal tend to install library packages under the .cabal folder?  So 
blowing it away gets rid of the problematic ones.  (And everything else.)

On 25 Feb 2013, at 16:56, Brent Yorgey wrote:

 On Sun, Feb 24, 2013 at 02:33:55PM +, Niklas Hambüchen wrote:
 You are right, my ghc-7.4.2 was broken in ghc-pkg list; I fixed the
 problem by killing my .cabal folder (as so often).
 
 Surely you mean by killing your .ghc folder?  I do not see what effect
 killing your .cabal folder could possibly have on broken packages.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install ghc-mod installs 3 years old version

2013-03-01 Thread Albert Y. C. Lai

On 13-03-01 05:10 AM, Malcolm Wallace wrote:

Doesn't Cabal tend to install library packages under the .cabal folder?  So 
blowing it away gets rid of the problematic ones.  (And everything else.)


You need to perform scientific experiments to refute that claim, then see my

http://www.vex.net/~trebla/haskell/sicp.xhtml#ident

then perform more scientific experiments to try to refute my claim (and 
see that my claim passes your scrutiny).


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install ghc-mod installs 3 years old version

2013-03-01 Thread Brandon Allbery
On Fri, Mar 1, 2013 at 12:08 PM, Albert Y. C. Lai tre...@vex.net wrote:

 On 13-03-01 05:10 AM, Malcolm Wallace wrote:

 Doesn't Cabal tend to install library packages under the .cabal folder?
  So blowing it away gets rid of the problematic ones.  (And everything
 else.)


 You need to perform scientific experiments to refute that claim, then see
 my


At least some versions of cabal-install do put the actual library install
trees under .cabal/lib, then register them under .ghc.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install ghc-mod installs 3 years old version

2013-02-25 Thread Brent Yorgey
On Sun, Feb 24, 2013 at 02:33:55PM +, Niklas Hambüchen wrote:
 You are right, my ghc-7.4.2 was broken in ghc-pkg list; I fixed the
 problem by killing my .cabal folder (as so often).

Surely you mean by killing your .ghc folder?  I do not see what effect
killing your .cabal folder could possibly have on broken packages.

-Brent

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install ghc-mod installs 3 years old version

2013-02-25 Thread Niklas Hambüchen
Yep, I usually kill ~/.ghc and ~/.cabal for this kind of reset.

On Mon 25 Feb 2013 16:56:56 GMT, Brent Yorgey wrote:
 On Sun, Feb 24, 2013 at 02:33:55PM +, Niklas Hambüchen wrote:
 You are right, my ghc-7.4.2 was broken in ghc-pkg list; I fixed the
 problem by killing my .cabal folder (as so often).

 Surely you mean by killing your .ghc folder?  I do not see what effect
 killing your .cabal folder could possibly have on broken packages.

 -Brent

 ___
 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


Re: [Haskell-cafe] cabal install ghc-mod installs 3 years old version

2013-02-24 Thread Niklas Hambüchen
You are right, my ghc-7.4.2 was broken in ghc-pkg list; I fixed the
problem by killing my .cabal folder (as so often).

Do you know if it is possible to make ghc-pkg list print some actual
text when packages are broken instead of writing them in red (which goes
away on output redirection)?

Thanks
Niklas

On 24/02/13 07:34, Ivan Lazar Miljenovic wrote:
 
 Which version of GHC (and hence base, etc.)? My guess is that for some
 reason it thinks that some requirement of the later versions is
 incompatible with your version of GHC.
 
 Maybe explicitly try  cabal install 'ghc-mod = 1.11.4'  and see why
 it doesn't like it.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install ghc-mod installs 3 years old version

2013-02-24 Thread Ivan Lazar Miljenovic
On 25 February 2013 01:33, Niklas Hambüchen m...@nh2.me wrote:
 You are right, my ghc-7.4.2 was broken in ghc-pkg list; I fixed the
 problem by killing my .cabal folder (as so often).

 Do you know if it is possible to make ghc-pkg list print some actual
 text when packages are broken instead of writing them in red (which goes
 away on output redirection)?

Just run ghc-pkg check every now and then?


 Thanks
 Niklas

 On 24/02/13 07:34, Ivan Lazar Miljenovic wrote:

 Which version of GHC (and hence base, etc.)? My guess is that for some
 reason it thinks that some requirement of the later versions is
 incompatible with your version of GHC.

 Maybe explicitly try  cabal install 'ghc-mod = 1.11.4'  and see why
 it doesn't like it.



-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
http://IvanMiljenovic.wordpress.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install ghc-mod installs 3 years old version

2013-02-23 Thread Ivan Lazar Miljenovic
On 24 February 2013 12:38, Niklas Hambüchen m...@nh2.me wrote:
 Hi,

 I just did cabal update and cabal install ghc-mod, and for some reason
 it tries to install version 0.3.0 from 3 years ago:

 
 cabal install ghc-mod -v
 Reading available packages...
 Choosing modular solver.
 Resolving dependencies...
 Ready to install ghc-mod-0.3.0
 Downloading ghc-mod-0.3.0...
 

 cabal --version
 cabal-install version 1.16.0.2
 using version 1.16.0.3 of the Cabal library


 Does anyone have an idea why that could be?

Which version of GHC (and hence base, etc.)? My guess is that for some
reason it thinks that some requirement of the later versions is
incompatible with your version of GHC.

Maybe explicitly try  cabal install 'ghc-mod = 1.11.4'  and see why
it doesn't like it.


 Thanks

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe



-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
http://IvanMiljenovic.wordpress.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-dev add-source

2013-02-08 Thread Blake Rain
You need to call cabal-dev add-source on P1 again to copy over the sdist,
then do a cabal-dev install.

See notes under Using a sandbox-local Hackage on
https://github.com/creswick/cabal-dev


On Feb 8, 2013 2:22 PM, JP Moresmau jpmores...@gmail.com wrote:

 Hello, I'm trying to understand cabal-dev, and I seem to be missing some
basic point, because I can't get dependencies between projects working
properly.
 I have two projects, let's call them P1 and P2. P2 depends on P1, as
indicated by its cabal file build-depends field.
 I run cabal-dev add-source ..\P1 inside P2
 then cabal-dev install
 Everything works fine, and my project compiles, with modules in P2
calling functions from P1.
 Then I add a new function if an exposed module of P1. I rerun the
cabal-dev add-source and cabal-dev install commands to tell P2 of the
change, as per the cabal-dev documentation. I change a file in P2 to use
the new function, the compilation fails.
 If I check into the cabal-dev folder, I see the .hi file for my changed
module has not been updated (old date).
 What am I missing?

 Thanks

 --
 JP Moresmau
 http://jpmoresmau.blogspot.com/

 ___
 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


Re: [Haskell-cafe] cabal-dev add-source

2013-02-08 Thread Johan Tibell
On Fri, Feb 8, 2013 at 9:53 AM, Blake Rain blake.r...@gmail.com wrote:

 You need to call cabal-dev add-source on P1 again to copy over the sdist,
 then do a cabal-dev install.

 See notes under Using a sandbox-local Hackage on
 https://github.com/creswick/cabal-dehttps://github.com/creswick/cabal-dev


With the new cabal sandboxing (due in 1.18) this won't be necessary as we
create a link to the repo, instead of installing a copy. We will rebuild
the linked repo as needed.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-dev add-source

2013-02-08 Thread JP Moresmau
That's exactly what I'm doing, and I was exactly following these notes, but
it doesn't work. This google+ post and the answers to it (
https://plus.google.com/102016502921512042165/posts/TGaENqWfubP) lead me to
at least one solution that seems to work: you need to unregister the
changed package first.
So
cabal-dev ghc-pkg unregister --force P1
cabal-dev add-source ../P1
cabal-dev install

Does the trick. There seems to be a way to pass a --reinstall flag to
cabal-dev install but I haven't gotten it to work yet.

Thanks

JP


On Fri, Feb 8, 2013 at 6:53 PM, Blake Rain blake.r...@gmail.com wrote:

 You need to call cabal-dev add-source on P1 again to copy over the sdist,
 then do a cabal-dev install.

 See notes under Using a sandbox-local Hackage on
 https://github.com/creswick/cabal-dev


 On Feb 8, 2013 2:22 PM, JP Moresmau jpmores...@gmail.com wrote:
 
  Hello, I'm trying to understand cabal-dev, and I seem to be missing some
 basic point, because I can't get dependencies between projects working
 properly.
  I have two projects, let's call them P1 and P2. P2 depends on P1, as
 indicated by its cabal file build-depends field.
  I run cabal-dev add-source ..\P1 inside P2
  then cabal-dev install
  Everything works fine, and my project compiles, with modules in P2
 calling functions from P1.
  Then I add a new function if an exposed module of P1. I rerun the
 cabal-dev add-source and cabal-dev install commands to tell P2 of the
 change, as per the cabal-dev documentation. I change a file in P2 to use
 the new function, the compilation fails.
  If I check into the cabal-dev folder, I see the .hi file for my changed
 module has not been updated (old date).
  What am I missing?
 
  Thanks
 
  --
  JP Moresmau
  http://jpmoresmau.blogspot.com/
 
  ___
  Haskell-Cafe mailing list
  Haskell-Cafe@haskell.org
  http://www.haskell.org/mailman/listinfo/haskell-cafe
 




-- 
JP Moresmau
http://jpmoresmau.blogspot.com/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-dev add-source

2013-02-08 Thread JP Moresmau
Johan, thanks, that brings me to a point that I wanted to raise. I'm
playing with cabal-dev because users have asked me to add support for it in
EclipseFP (so projects could have their own sandbox and have dependencies
between projects without polluting the main package databases). It is worth
it, or should I just wait for cabal 1.18 and use the sandboxing facility?
Or will the two work similarly enough that supporting both will be easy?
Does the sandboxing in cabal means that tools like cabal-dev are going to
get deprecated?

Thanks

JP


On Fri, Feb 8, 2013 at 7:02 PM, Johan Tibell johan.tib...@gmail.com wrote:

 On Fri, Feb 8, 2013 at 9:53 AM, Blake Rain blake.r...@gmail.com wrote:

 You need to call cabal-dev add-source on P1 again to copy over the sdist,
 then do a cabal-dev install.

 See notes under Using a sandbox-local Hackage on
 https://github.com/creswick/cabal-dehttps://github.com/creswick/cabal-dev


 With the new cabal sandboxing (due in 1.18) this won't be necessary as we
 create a link to the repo, instead of installing a copy. We will rebuild
 the linked repo as needed.




-- 
JP Moresmau
http://jpmoresmau.blogspot.com/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-dev add-source

2013-02-08 Thread Johan Tibell
On Fri, Feb 8, 2013 at 10:07 AM, JP Moresmau jpmores...@gmail.com wrote:

 Johan, thanks, that brings me to a point that I wanted to raise. I'm
 playing with cabal-dev because users have asked me to add support for it in
 EclipseFP (so projects could have their own sandbox and have dependencies
 between projects without polluting the main package databases). It is worth
 it, or should I just wait for cabal 1.18 and use the sandboxing facility?
 Or will the two work similarly enough that supporting both will be easy?
 Does the sandboxing in cabal means that tools like cabal-dev are going to
 get deprecated?


I think they will be similar enough that you could easily port the code.
The new cabal sandboxing will work as follows:

cabal sandbox --init
cabal add-source dir

and then you use cabal commands like normal (e.g. configure, build, test).
No installing necessary.

I cannot speak for the cabal-dev developers. We do intend to support a
superset of the cabal-dev functionality eventually. What we're missing now
is ghci support.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-dev add-source

2013-02-08 Thread Ozgun Ataman


On Friday, February 8, 2013 at 1:19 PM, Johan Tibell wrote:

 On Fri, Feb 8, 2013 at 10:07 AM, JP Moresmau jpmores...@gmail.com 
 (mailto:jpmores...@gmail.com) wrote:
  Johan, thanks, that brings me to a point that I wanted to raise. I'm 
  playing with cabal-dev because users have asked me to add support for it in 
  EclipseFP (so projects could have their own sandbox and have dependencies 
  between projects without polluting the main package databases). It is worth 
  it, or should I just wait for cabal 1.18 and use the sandboxing facility? 
  Or will the two work similarly enough that supporting both will be easy? 
  Does the sandboxing in cabal means that tools like cabal-dev are going to 
  get deprecated? 
 
 I think they will be similar enough that you could easily port the code. The 
 new cabal sandboxing will work as follows:
 
 cabal sandbox --init
 cabal add-source dir
 
 and then you use cabal commands like normal (e.g. configure, build, test). No 
 installing necessary.
 
 I cannot speak for the cabal-dev developers. We do intend to support a 
 superset of the cabal-dev functionality eventually. What we're missing now is 
 ghci support.
Which, thanks to Johan's help yesterday, can still be worked around (for now) 
by starting ghci with:

ghci -package-conf ./cabal-sandbox/your-package-conf-folder-here/ 

I'm trying to get Emacs haskell-mode and inferior-haskell to play nice with 
this, but it's not working so far for some reason.
 
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org (mailto: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


Re: [Haskell-cafe] cabal-dev add-source

2013-02-08 Thread Johan Tibell
On Fri, Feb 8, 2013 at 10:24 AM, Ozgun Ataman ozata...@gmail.com wrote:

  Which, thanks to Johan's help yesterday, can still be worked around (for
 now) by starting ghci with:

 ghci -package-conf ./cabal-sandbox/your-package-conf-folder-here/


You can indeed do this. For real ghci support in cabal we need to also pass
-package flags, C libraries, etc to ghci. That's why it's not done yet.

-- Johan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install choosing an older version

2013-01-26 Thread Simon Hengel
Hi Ozgur,
I'm missing some context here, but I'll release an updated version of
hspec ASAP ;)

Cheers,
Simon

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install choosing an older version

2013-01-25 Thread Ozgur Akgun
Aha!

I think I know why this happens.

The latest versions of ansi-terminal and hspec do not work together. Cabal
picks the latest ansi-terminal (0.6) first, then the latest hspec that
doesn't conflict with this choice is 0.3.0.

I can confirm this by the following:

$ cabal install hspec ansi-terminal --dry-run -v
Reading available packages...
Choosing modular solver.
Resolving dependencies...
In order, the following would be installed:
HUnit-1.2.5.1 (new package)
ansi-terminal-0.5.5.1 (new package)
hspec-expectations-0.3.0.3 (new package)
random-1.0.1.1 (new package)
QuickCheck-2.5.1.1 (new package)
setenv-0.1.0 (new package)
silently-1.2.4.1 (new package)
transformers-0.3.0.0 (new package)
hspec-1.4.3 (new package)

When hspec comes before ansi-terminal, the latest version for hspec is
selected and an older version of ansi-terminal is used.

Maybe cabal-install should backtrack more and pick a *more optimal *set of
latest versions, I don't know. If this is desired, a proximity of the
selected versions to the latest available versions might be a good measure.

Best,
Ozgur
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install choosing an older version

2013-01-25 Thread Max Bolingbroke
On 25 January 2013 14:46, Ozgur Akgun ozgurak...@gmail.com wrote:
 The latest versions of ansi-terminal and hspec do not work together. Cabal
 picks the latest ansi-terminal (0.6) first, then the latest hspec that
 doesn't conflict with this choice is 0.3.0.

If this happens because the dependency bounds of ansi-terminal are too
tight then please send me a patch.

Cheers,
Max

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install choosing an older version

2013-01-25 Thread Ozgur Akgun
Hi Max,

On 25 January 2013 15:58, Max Bolingbroke batterseapo...@hotmail.comwrote:


 If this happens because the dependency bounds of ansi-terminal are too
 tight then please send me a patch.


No, actually it happens because hspec depends on ansi-terminal-0.5.*.

I am cc'ing Simon Hengel, the maintainer of hspec so he is aware of this.

Best,
Ozgur
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal sdist warns about optimization levels

2013-01-13 Thread Daniel Fischer
On Sunday 13 January 2013, 21:27:44, Petr P wrote:
 
 I wonder:
 
 (1) Is there a way how to disable the warning? As the main aim of the
 library is speed, I believe -O2 is appropriate here. And since the code is
 quite short, I'm quite sure the increased compile time won't be noticeable.
 
 (2) Why does cabal complain about it at the first place? I found a
 reference saying the warning is adequate:
 https://github.com/haskell/cabal/issues/808
 but not saying why. Maybe for complex programs -O2 prolongs compile time
 too much, but libraries are usually compiled once and used many times, so
 using -O2 for them seems reasonable in many cases.

Sometimes compiling with -O2 instead of just -O takes significantly longer.
Not always is the produced result faster (often, the results are identical).

So if the code produced with -O performs equally to that produced with -O2, 
and the -O2 compilation takes significantly longer, choosing -O2 imposes a 
cost for no benefit.

That's, I think, why the warning is considered adequate.

You can specify -O2 on a per-module basis with an
{-# OPTIONS_GHC -O2 #-}
pragma where it matters, then cabal won't complain.

Or, if you're too lazy to check the consequences of -O2 vs. -O for each module 
(like I usually am, if there are more than a handful), just verify that -O2 
does indeed make a significant difference for the speed of the result in some 
places without increasing compile time unduly, and henceforth ignore the 
warning if it does. (Re-test every couple of compiler versions.)
After some time, you tend to not even notice it anymore ;)

Cheers,
Daniel

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal sdist warns about optimization levels

2013-01-13 Thread Duncan Coutts
On 13 January 2013 20:27, Petr P petr@gmail.com wrote:

 to the cabal file. Now cabal sdist complains with:

 'ghc-options: -O2' is rarely needed. Check that it is giving a real
 benefit and not just imposing longer compile times on your users.

 I wonder:

 (1) Is there a way how to disable the warning? As the main aim of the
 library is speed, I believe -O2 is appropriate here. And since the code is
 quite short, I'm quite sure the increased compile time won't be noticeable.

No, but you can just ignore it. You clearly have checked and you're
satisfied it's the right thing to do, so it's fine.

You don't need to hit 0 warnings, nobody is going to give you or your
package black marks becuase of it! :-)

 (2) Why does cabal complain about it at the first place?

There's lots of programs where it makes no measurable difference
except to make compile times longer. To some extent it's to try to
break the habbit of C programmers who always default to -O2. With gcc
-O2 will almost always be significantly better than -O, but with ghc
that's not the case: -O is the sensible default (almost by definition,
to a first approximation, things that are always a win get put into
-O, things that are sometimes a win and sometimes not go into -O2).

Duncan

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal bug? repeat --reinstall

2013-01-10 Thread Niklas Hambüchen
Where do we report this?

On 05/01/13 02:36, Albert Y. C. Lai wrote:
 On 13-01-04 04:36 PM, Niklas Hambüchen wrote:
 I get the following:

 $ cabal install --only-dependencies --reinstall

 Resolving dependencies...
 All the requested packages are already installed:
 Use --reinstall if you want to reinstall anyway.


 Can somebody confirm that they see the same?
 
 I confirm.
 
 
 ___
 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


Re: [Haskell-cafe] Cabal bug? repeat --reinstall

2013-01-10 Thread Niklas Hambüchen
Ahah on Github. Filed as https://github.com/haskell/cabal/issues/1175.

On Fri 11 Jan 2013 01:21:11 CET, Niklas Hambüchen wrote:
 Where do we report this?

 On 05/01/13 02:36, Albert Y. C. Lai wrote:
 On 13-01-04 04:36 PM, Niklas Hambüchen wrote:
 I get the following:

 $ cabal install --only-dependencies --reinstall

 Resolving dependencies...
 All the requested packages are already installed:
 Use --reinstall if you want to reinstall anyway.


 Can somebody confirm that they see the same?

 I confirm.


 ___
 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


Re: [Haskell-cafe] Cabal bug? repeat --reinstall

2013-01-04 Thread Albert Y. C. Lai

On 13-01-04 04:36 PM, Niklas Hambüchen wrote:

I get the following:

$ cabal install --only-dependencies --reinstall

Resolving dependencies...
All the requested packages are already installed:
Use --reinstall if you want to reinstall anyway.


Can somebody confirm that they see the same?


I confirm.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal: Retrieve directory in which binaries get installed

2012-12-17 Thread Roman Cheplyaka
There's getBinDir in the generated module Paths_pkgname
(dist/build/autogen/Paths_pkgname.hs).

This module is generated by cabal configure and can be imported
in the modules of your package.

Roman

* Björn Peemöller b...@informatik.uni-kiel.de [2012-12-17 11:05:52+0100]
 Hello cafe,
 
 I'd like to retrieve the path in which binaries get installed when I
 `cabal install` a package.
 
 Normally, this would be ~/.cabal/bin on my Linux, but since I share my
 home folder on two architectures, in ~/.cabal/config I set the
 user-install prefix to ~/.cabal/$arch, so binaries get installed to
 ~/.cabal/$arch/bin.
 
 I have the feeling that it should be rather simple to retrieve the
 FilePath from the Cabal API, does anyone know how to do this?
 
 Thanks in advance,
 Björn
 
 ___
 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


Re: [Haskell-cafe] cabal configure cabal build cabal install

2012-12-10 Thread Aleksandar Dimitrov
On Mon, Nov 26, 2012 at 06:21:33PM -0500, Albert Y. C. Lai wrote:
 cabal configure is used by a lot of programmers. Today. Why?
 
 Because they use it on their own projects. They use cabal-install as
 a builder, not exactly an installer.

Don't most devs nowadays use sandboxing, a.k.a. cabal-dev? I know I do, I've 
found
cabal to be impossible to work with as a development tool without sandboxing. I
think there was effort to bring cabal-dev like functionality to standard cabal
in the next big release.

Ah yes, here:

http://hackage.haskell.org/trac/hackage/wiki/SandboxedBuildsAndIsolatedEnvironments

In general, I consider sandboxing really important, even without dependency
hell: I will sometimes want experimental and/or old versions of libraries to
depend on that I don't want installed globally.

Best,
Aleks


signature.asc
Description: Digital signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal configure cabal build cabal install

2012-11-27 Thread kudah
On Tue, 27 Nov 2012 02:20:35 -0500 Albert Y. C. Lai tre...@vex.net
wrote:

 When cabal build succeeds, it always says:
 
 (older) registering name-version
 (newer) In-place registering name-version
 
 That's what it says. But use ghc-pkg and other tests to verify that
 no registration whatsoever has happened.

It doesn't register in user package-db, it registers in it's own
dist/package.conf.inplace. If it didn't you wouldn't be able to build
an executable and a library in one package such that executable depends
on the library.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal configure cabal build cabal install

2012-11-27 Thread Albert Y. C. Lai

On 12-11-27 04:40 AM, kudah wrote:

On Tue, 27 Nov 2012 02:20:35 -0500 Albert Y. C. Lai tre...@vex.net
wrote:


When cabal build succeeds, it always says:

(older) registering name-version
(newer) In-place registering name-version

That's what it says. But use ghc-pkg and other tests to verify that
no registration whatsoever has happened.


It doesn't register in user package-db, it registers in it's own
dist/package.conf.inplace. If it didn't you wouldn't be able to build
an executable and a library in one package such that executable depends
on the library.


That's fair. But it also means

cabal configure
cabal build

is not equivalent to

cabal configure
cabal build
cabal register --inplace

which was the context when you said (newer) cabal build registers 
inplace automatically.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal configure cabal build cabal install

2012-11-26 Thread Herbert Valerio Riedel
Brent Yorgey byor...@seas.upenn.edu writes:
 On Sun, Nov 25, 2012 at 06:09:26PM -0500, Albert Y. C. Lai wrote:

 If you begin with cabal configure, the correct idiom is:
 
 cabal configure [flags]
 cabal build
 [cabal haddock, if you want]
 cabal copy
 cabal register

 Even this does not do the same thing as 'cabal install', because it
 does not download and install any dependencies (whereas 'cabal
 install' does).

...but if he prepended a 'cabal install --only-dependencies' to the
invocation sequence it would, wouldn't it?

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal configure cabal build cabal install

2012-11-26 Thread Kim-Ee Yeoh
Nice tip, Albert! Good to know! One question I have is, is (runghc
Setup.lhs) equivalent to (cabal) in

runghc Setup.lhs $ [configure, build, install]

?

On Mon, Nov 26, 2012 at 8:08 AM, Brent Yorgey byor...@seas.upenn.eduwrote:

  [cabal haddock, if you want]
  cabal copy
  cabal register

 Even this does not do the same thing as 'cabal install', because it
 does not download and install any dependencies (whereas 'cabal
 install' does).


Brent, that's useful to know too, thanks!

Fwiw, I think Albert had the backdrop of classic GNU autoconf in mind,
predating all that newfangled stuff of downloading (!) dependencies (!!).



-- Kim-Ee



 -Brent

 ___
 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


Re: [Haskell-cafe] cabal configure cabal build cabal install

2012-11-26 Thread Albert Y. C. Lai

On 12-11-26 04:34 AM, Kim-Ee Yeoh wrote:

Nice tip, Albert! Good to know! One question I have is, is (runghc
Setup.lhs) equivalent to (cabal) in

runghc Setup.lhs $ [configure, build, install]

?


Setup defaults to --global --prefix=/usr/local
cabal defaults to --user --prefix=$HOME/.cabal

This confuses a lot of people.

FAQ #1: Why does Setup copy abort and say no permission?
Answer: because you haven't escalated privilege for writing to /usr/local

FAQ #2: Why does sudo cabal install register nothing in both the 
global database and my database?
Answer: because --user means not global, and sudo means the user is 
root, not you. Look under /root.


Lastly, there is no Setup install. Use copy and register.


On Mon, Nov 26, 2012 at 8:08 AM, Brent Yorgey byor...@seas.upenn.edu
mailto:byor...@seas.upenn.edu wrote:

  [cabal haddock, if you want]
  cabal copy
  cabal register

Even this does not do the same thing as 'cabal install', because it
does not download and install any dependencies (whereas 'cabal
install' does).


Brent, that's useful to know too, thanks!

Fwiw, I think Albert had the backdrop of classic GNU autoconf in mind,
predating all that newfangled stuff of downloading (!) dependencies (!!).


This is ignorant of a common workflow.

cabal configure is used by a lot of programmers. Today. Why?

Because they use it on their own projects. They use cabal-install as a 
builder, not exactly an installer.


In fact, some of them do:

cabal configure
cabal build
cabal register --inplace

This has no cabal install correspondence.

So you ask, but surely their own projects require some packages from 
hackage?


Yes, surely. But those packages have already been installed in the past, 
once and for all. That is, when the project started, they already did 
cabal install yesod.


This is not so old-school, is it?

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal configure cabal build cabal install

2012-11-26 Thread kudah
On Mon, 26 Nov 2012 18:21:33 -0500 Albert Y. C. Lai tre...@vex.net
wrote:

 Lastly, there is no Setup install. Use copy and register.

$ runghc Setup.hs --help
 This Setup program uses the Haskell Cabal Infrastructure.
 See http://www.haskell.org/cabal/ for more information.
 
 Usage: Setup.hs COMMAND [FLAGS]
or: Setup.hs [GLOBAL FLAGS]
 
 Global flags:
  -h --helpShow this help text
  -V --version Print version information
 --numeric-version Print just the version number
 
 Commands:
   configure Prepare to build the package.
   build Make this package ready for installation.
   install   Copy the files into the install locations. Run register.
   copy  Copy the files into the install locations.
   haddock   Generate Haddock HTML documentation.
   clean Clean up after a build.
   sdist Generate a source distribution file (.tar.gz).
   hscolour  Generate HsColour colourised code, in HTML format.
   register  Register this package with the compiler.
   unregisterUnregister this package with the compiler.
   test  Run the test suite, if any (configure with UserHooks).
   bench Run the benchmark, if any (configure with UserHooks).
   help  Help about commands
 
 For more information about a command use
   Setup.hs COMMAND --help
 
 Typical steps for installing Cabal packages:
   Setup.hs configure
   Setup.hs build
   Setup.hs install

On Mon, 26 Nov 2012 18:21:33 -0500 Albert Y. C. Lai tre...@vex.net
wrote:

 cabal configure
 cabal build
 cabal register --inplace

(newer) cabal build registers inplace automatically.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal configure cabal build cabal install

2012-11-26 Thread Albert Y. C. Lai

On 12-11-27 01:02 AM, kudah wrote:

On Mon, 26 Nov 2012 18:21:33 -0500 Albert Y. C. Lai tre...@vex.net
wrote:


Lastly, there is no Setup install. Use copy and register.


$ runghc Setup.hs --help

[...]

   install   Copy the files into the install locations. Run register.
   copy  Copy the files into the install locations.


I stand corrected, thank you. But then to complete answering a previous 
question, Setup install does not configure, does not build, and is far 
from cabal install.



(newer) cabal build registers inplace automatically.


I see where you heard this, but it is a misrepresentation from cabal, 
and older cabal has always told a similar misrepresentation.


When cabal build succeeds, it always says:

(older) registering name-version
(newer) In-place registering name-version

That's what it says. But use ghc-pkg and other tests to verify that no 
registration whatsoever has happened.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal configure cabal build cabal install

2012-11-25 Thread Brent Yorgey
On Sun, Nov 25, 2012 at 06:09:26PM -0500, Albert Y. C. Lai wrote:
 
 If you begin with cabal configure, the correct idiom is:
 
 cabal configure [flags]
 cabal build
 [cabal haddock, if you want]
 cabal copy
 cabal register

Even this does not do the same thing as 'cabal install', because it
does not download and install any dependencies (whereas 'cabal
install' does).

-Brent

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal isn't updating local doc index after local package upgrade

2012-11-24 Thread Roman Cheplyaka
This is filed as https://github.com/haskell/cabal/issues/1051

* Richard Cobbe co...@ccs.neu.edu [2012-11-24 12:43:55-0500]
 Haskell Platform 2012 v2.0.0, MacOS 64-bit.  (MacOS 10.8.2.)
 
 I just used cabal to upgrade the installation of a local package I'm
 writing, and I'm still seeing the old version of the documentation in
 ~/Library/Haskell/doc/index.html.  How can I fix this?
 
 In more detail: this machine had greek-1.0.1 installed, but I was working
 on another package that needed greek-1.1.0.  So I went into the directory
 where I keep the source for the greek package, made sure it was up-to-date,
 and ran
 
 cabal clean  cabal configure  cabal build  cabal install
 
 as my normal user, not as root.  As far as I can tell, the rebuild was
 successful; cabal's output finished with
 
 Installing library in
 /Users/cobbe/Library/Haskell/ghc-7.4.1/lib/greek-1.1.0/lib
 Registering greek-1.1.0...
 Updating documentation index /Users/cobbe/Library/Haskell/doc/index.html
 
 However, when I open ~/Library/Haskell/doc/index.html in my browser, I
 still see the documentation for greek-1.0.  The docs for the new version
 are present, in ~/Library/Haskell/ghc-7.4.1/lib/greek-1.1.0/doc, but they
 don't appear in the main index.
 
 Am I missing a step in the process, or is this a bug in cabal?  Is there a
 workaround?
 
 I do have a couple of older versions of the greek package insatlled,
 because there doesn't seem to be an easy way to remove obsolete packages.
 Could they be causing problems?  If so, what's the best way to delete them?
 (I don't particularly mind having the older versions hanging around, as
 long as they're actually harmless.)
 
 Thanks much,
 
 Richard
 
 ___
 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


Re: [Haskell-cafe] cabal isn't updating local doc index after local package upgrade

2012-11-24 Thread Richard Cobbe
On Sat, Nov 24, 2012 at 08:37:31PM +0200, Roman Cheplyaka wrote:
 This is filed as https://github.com/haskell/cabal/issues/1051

Ah!  Thanks for the pointer; I didn't know about that bug database.  I'll
watch that issue for further developments.

 * Richard Cobbe co...@ccs.neu.edu [2012-11-24 12:43:55-0500]
  Haskell Platform 2012 v2.0.0, MacOS 64-bit.  (MacOS 10.8.2.)
 
  I just used cabal to upgrade the installation of a local package I'm
  writing, and I'm still seeing the old version of the documentation in
  ~/Library/Haskell/doc/index.html.  How can I fix this?

Richard

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-23 Thread kudah
Personally, I successfully use Wine to build, ship and test for Windows.
There are some pitfalls related to -optl-mwindows and encodings,
but, if you launch your program with $LANG set to proper windows
encoding like cp1251 and the std handles closed with  0- 1- 2-,
it should crash on related errors the same way as on windows.

I am not (yet) aware of any Haskell programs that don't run under Wine.

On Wed, 21 Nov 2012 13:05:45 +1100 Erik de Castro Lopo
mle...@mega-nerd.com wrote:

 So is it difficult for an open source contributor to test on windows?
 Hell yes! You have no idea how hard windows is in comparison to say
 FreeBSD. Even Apple's OS X is easier than windows, because I have
 friends who can give me SSH access to their machines.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-23 Thread Erik de Castro Lopo
kudah wrote:

 Personally, I successfully use Wine to build, ship and test for Windows.
 There are some pitfalls related to -optl-mwindows and encodings,
 but, if you launch your program with $LANG set to proper windows
 encoding like cp1251 and the std handles closed with  0- 1- 2-,
 it should crash on related errors the same way as on windows.
 
 I am not (yet) aware of any Haskell programs that don't run under Wine.

Thats a very interesting solution. I use Wine to run the test suite
when I cross compile one of my C projects from Linux to Wine.

Would you consider documenting the process of setting everything up
to build Haskell programs under Wine on the Haskell Wiki?

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-23 Thread kudah
On Sat, 24 Nov 2012 13:46:37 +1100 Erik de Castro Lopo
mle...@mega-nerd.com wrote:

 kudah wrote:
 
  Personally, I successfully use Wine to build, ship and test for
  Windows. There are some pitfalls related to -optl-mwindows and
  encodings, but, if you launch your program with $LANG set to proper
  windows encoding like cp1251 and the std handles closed with  0-
  1- 2-, it should crash on related errors the same way as on
  1windows.
  
  I am not (yet) aware of any Haskell programs that don't run under
  Wine.
 
 Thats a very interesting solution. I use Wine to run the test suite
 when I cross compile one of my C projects from Linux to Wine.
 
 Would you consider documenting the process of setting everything up
 to build Haskell programs under Wine on the Haskell Wiki?
 
 Erik

Aside from what I posted above it's same as on Windows, just install
Haskell Platform. There's already a page on Haskell Wiki
http://www.haskell.org/haskellwiki/GHC_under_Wine though it seems very
outdated. I can update it with my own observations when I get an HW
account, they seem to have switched to manual registration while I
wasn't looking.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-21 Thread Niklas Larsson
I just want to say that Windows support is much better than one could
get the impression from this thread. I use Haskell on Windows as well
as OSX and Linux. I think it works very well now, previously one had
to know a bit of trickery to get things done.

I don't think I have run into any more trouble on Windows than on the
unixes, certainly there has been less headaches than with OSX (mostly
GHC there), and you don't get the distro-hackage tension as on Linux.
It is a bit annoying that packages depending on unix don't just quit
upfront instead of installing a scad of dependencies first. But a
mucked up package database that this thread is about can happen on any
platform.

The problem seems to be that cabal-install is so wonderfully easy to
use that it obscures that there are no guarantees that things will
just work and that it is often quite possible to fix it yourself by a
tweak. If people think that what cabal install does behind the
scenes is some advanced magic, it will not occur to them that they can
do cabal unpack, fix the problem, and then cabal configure, cabal
build and cabal install.

Niklas

2012/11/21 Erik de Castro Lopo mle...@mega-nerd.com:
 Albert Y. C. Lai wrote:

 This counter-argument is flawed. Why limit oneself to one's own
 household? (Garage? Basement?) Get out more! Visit a friend.

 If that friend is not a coder, they are unlikely to have the dev tools
 installed.

 Talk to an
 internet cafe owner for a special deal to run one's own programs.

 Ditto.

 Rent virtual machine time in the cloud.

 I've already thrown a bunch of money at the microsoft machine for very
 poor results. If someone else set up and ran windows VMs and gave me
 access that would make testing on windows far more attractive.

 I just found that Amazon AWS has a free teir that includes windows
 as an option:

 https://aws.amazon.com/free/

 Its still a huge sink of time and effort to set one up to a state where
 its ready to build haskell packages. Maybe if someone set up a github
 project that contained a script that could be downloaded onto a bare
 windows machine and then bootstrap that machine into a full haskell dev
 machine you might see some progress on this front.

 Erik
 --
 --
 Erik de Castro Lopo
 http://www.mega-nerd.com/

 ___
 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


Re: [Haskell-cafe] Cabal failures...

2012-11-21 Thread Mike Meyer
On Tue, Nov 20, 2012 at 7:34 PM, Albert Y. C. Lai tre...@vex.net wrote:
 On 12-11-20 08:20 PM, Johan Tibell wrote:
 This logic is flawed. More than 90% of computers having Windows doesn't
 imply that 90% of all computers in a given household runs Windows.
 What's the probability that your household has a Windows computer if
 you're a programmer that don't live with your parents? What if that
 programmer is an open source contributor. Surely not 90%.
 This counter-argument is flawed. Why limit oneself to one's own household?
 (Garage? Basement?) Get out more! Visit a friend. Talk to an internet cafe
 owner for a special deal to run one's own programs. Rent virtual machine
 time in the cloud. There are many creative, flexible, low-cost
 possibilities.

The key word here is low-cost. None of them are as low as the cost
of Linux, Solaris, *BSD, etc. Those are all free. There's even free VM
software available for them so you don't have to dedicate a machine to
it.

This actually makes the argument running in the other direction more
telling. It's less expensive for Windows users to get Unix/Linux than
Unix/Linux users to get Windows. If you want a Haskell environment to
work in, install VirtualBoxOSE (free) and a Linux distro (also free)
and work on that.

Of course, the real cost is that maintaining software that you aren't
using on a regular basis - which includes software you do use on a
platform you don't - is a PITA. Given that, why would anyone doing
something for free want to spend money for (access to a) copy of
Windows to build/test software they aren't going to use?

Insert standard OSS rant about do it yourself here.

mike

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install...

2012-11-21 Thread Sturdy, Ian
The latest version of cabal-dev on Hackage does not seem to have had its 
dependencies updated for GHC 7.6. Try installing off github 
(https://github.com/creswick/cabal-dev).

Ian Sturdy

From: haskell-cafe-boun...@haskell.org [haskell-cafe-boun...@haskell.org] on 
behalf of Eric Velten de Melo [ericvm...@gmail.com]
Sent: Tuesday, November 20, 2012 7:54 PM
To: Johan Tibell
Cc: Gregory Guthrie; haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] cabal install...

I have a dream of one day being able to install leksah without having
to downgrade ghc. Right now I can't even install cabal-dev with cabal.
It will break ghc if I do.

2012/11/20 Johan Tibell johan.tib...@gmail.com:
 On Tue, Nov 20, 2012 at 1:10 PM, Gregory Guthrie guth...@mum.edu wrote:

 Hmm,

 Now when I tried to run Leksah, I get not only some broken packages (which
 I can avoid for my current project), but:



 command line: cannot satisfy -package-id
 base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917:

 base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917 is unusable due to
 missing or recursive dependencies:

   integer-gmp-0.4.0.0-c15e185526893c3119f809251aac8c5b

 (use -v for more information)



 So I tried to install base, then re-install it, but both fail;

 Any hints?


 From this email and some of the previous emails it seems that your package
 DB is in a pretty bad state, most likely from using --force-reinstalls. When
 Cabal warns you that this will break stuff it actually means it. :) My
 suggestion is that you

 rm -rf  ~/.ghc/x86_64-linux-7.6.1  # or equivalent on your system.

 Then reinstall all the packages you want by listing them all at once

 cabal install pkg1 pkg2 pk3

 By listing them all together cabal-install tries to come up with an install
 plan that is globally consistent for all of them.

 -- Johan


 ___
 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


Re: [Haskell-cafe] cabal install... Trying to recover

2012-11-21 Thread Gregory Guthrie
Thanks for the suggestion, I’ll do that. Here goes:

I deleted the ../user/appdata/roaming/ghc and ../cabal files, an uninstalled 
Haskell-platform. (No trace of anything ghc on the disk.)
Then reinstalled Haskell, and ran “cabal update”, it said there was a new 
cabal-install, but trying to install it fails (below), so I went ahead with the 
current version.
The error seems odd to me (cabal-install-1.16.0.2 depends on Cabal-1.16.0.3 
which failed to install.), that an older version depends on a newer one?

So now I have; (from Windows - Haskell-platform 2012.4.0.0)
GHCi = The Glorious Glasgow Haskell Compilation System, version 7.4.2
Cabal = cabal-install version 0.14.0, using version 1.14.0 of the Cabal library

I then tried to reload all my previous packages, (all at once?!), but it fails, 
out of memory (w/8GB of memory!)
So I split it into sections, and tried the first one; it lists a lot of new 
installs, and then fails
  (full list at http://pastebin.com/5ywdUjgX)

The first chunk of installs gives this:
   ...
   cabal: The following packages are likely to be broken by the reinstalls:
   QuickCheck-2.4.2
   haskell-platform-2012.4.0.0
   Use --force-reinstalls if you want to install anyway.

I don't understand how it can want to break the Haskell-platform, sounds 
dangerous!  

And the second this:
   G:\Cabalcabal install Boolean Craft3e Craft3e GLFW GLURaw GLUT HTTP 
IORefCAS Me
   moTrie MonadCatchIO-mtl NumInstances ObjectName OpenGL OpenGLRaw QuickCheck 
SDL
   SHA StateVar Tensor abstract-deque abstract-par active aeson alex 
ansi-terminal
   array asn1-data attoparsec attoparsec-conduit base-unicode-symbols 
base64-bytest
   ring bits-atomic blaze-builder blaze-builder-conduit blaze-html blaze-markup 
bla
   ze-svg bmp buildwrapper byteorder cabal-dev case-insensitive cereal 
certificate
   clientsession cmdargs colour comonad conduit contravariant cookie cpphs 
cprng-ae
   s cpu criterion crypto-api crypto-conduit crypto-pubkey-types cryptocipher 
crypt
   ohash css-text data-default date-cache diagrams-core diagrams-lib 
diagrams-svg d
   list email-validate entropy erf failure fast-logger file-embed filepath 
filesyst
   em-conduit ghc-paths gloss gtk2hs-buildtools
   Resolving dependencies...
   In order, the following would be installed:
   Boolean-0.1.1 (new package)
   ...
   cabal: The following packages are likely to be broken by the reinstalls:
   regex-posix-0.95.1
   regex-compat-0.95.1
   regex-posix-0.94.4
   regex-compat-0.93.1
   parsec-3.1.1
   fgl-5.4.2.4
   fgl-5.4.2.3
   QuickCheck-2.4.0.1
   network-2.3.1.0
   haskell-platform-2012.4.0.0
   cgi-3001.1.7.4
   HTTP-4000.2.5
   regex-posix-0.95.2
   regex-compat-0.95.1
   regex-posix-0.95.1
   regex-compat-0.95.1
   Use --force-reinstalls if you want to install anyway.
   
So I have a typical situation where it won't install, and gives an option to 
–force, but that seems to lead to more problems?
Do I just have some packages which are intrinsically incompatible, and I have 
to choose between them?

Not sure how to proceed. Any help or hints appreciated!  :-)

–––-
 Cabal install cabal-install
  Configuring Cabal-1.16.0.3...
  Warning: This package indirectly depends on multiple versions of the same
  package. This is highly likely to cause a compile failure.
  package process-1.1.0.1 requires base-4.5.0.0
  package pretty-1.1.1.0 requires base-4.5.0.0
  package old-time-1.1.0.0 requires base-4.5.0.0
  package old-locale-1.0.0.4 requires base-4.5.0.0
  package filepath-1.3.0.0 requires base-4.5.0.0
  package directory-1.1.0.2 requires base-4.5.0.0
  package deepseq-1.3.0.0 requires base-4.5.0.0
  package containers-0.4.2.1 requires base-4.5.0.0
  package bytestring-0.9.2.1 requires base-4.5.0.0
  package array-0.4.0.0 requires base-4.5.0.0
  package Win32-2.2.2.0 requires base-4.5.0.0
  package filepath-1.3.0.0 requires base-4.5.1.0
  package Cabal-1.16.0.3 requires base-4.5.1.0
  package Cabal-1.16.0.3 requires filepath-1.3.0.0
  package process-1.1.0.1 requires filepath-1.3.0.0
  package directory-1.1.0.2 requires filepath-1.3.0.0
  package integer-gmp-0.4.0.0 requires ghc-prim-0.2.0.0
  package bytestring-0.9.2.1 requires ghc-prim-0.2.0.0
  package base-4.5.0.0 requires ghc-prim-0.2.0.0
  package integer-gmp-0.4.0.0 requires ghc-prim-0.2.0.0
  package base-4.5.1.0 requires ghc-prim-0.2.0.0
  package base-4.5.1.0 requires integer-gmp-0.4.0.0
  package base-4.5.0.0 requires integer-gmp-0.4.0.0
  Building Cabal-1.16.0.3...
  Preprocessing library Cabal-1.16.0.3...
  command line: cannot satisfy -package-id 
array-0.4.0.0-3cf1bc3f5cd0078adea24752c18081b9
  (use -v for more information)
  cabal: Error: some packages failed to install:
  Cabal-1.16.0.3 failed during the building phase. The exception was:
  ExitFailure 1
  cabal-install-1.16.0.2 depends on Cabal-1.16.0.3 which failed to install.

(more -v details at: http://pastebin.com/Y2BuMjBP )

Re: [Haskell-cafe] cabal install... Trying to recover

2012-11-21 Thread Niklas Larsson
You should have a ghc directory under appdata, with
i386-mingw32-7.4.2\package.conf.d under it. There GHC tracks what
packages it knows about.

Niklas
From: Gregory Guthrie
Sent: 2012-11-21 15:11
To: Johan Tibell
Cc: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] cabal install... Trying to recover
Thanks for the suggestion, I’ll do that. Here goes:

I deleted the ../user/appdata/roaming/ghc and ../cabal files, an
uninstalled Haskell-platform. (No trace of anything ghc on the
disk.)
Then reinstalled Haskell, and ran “cabal update”, it said there was a
new cabal-install, but trying to install it fails (below), so I went
ahead with the current version.
The error seems odd to me (cabal-install-1.16.0.2 depends on
Cabal-1.16.0.3 which failed to install.), that an older version
depends on a newer one?

So now I have; (from Windows - Haskell-platform 2012.4.0.0)
GHCi = The Glorious Glasgow Haskell Compilation System, version 7.4.2
Cabal = cabal-install version 0.14.0, using version 1.14.0 of the Cabal library

I then tried to reload all my previous packages, (all at once?!), but
it fails, out of memory (w/8GB of memory!)
So I split it into sections, and tried the first one; it lists a lot
of new installs, and then fails
  (full list at http://pastebin.com/5ywdUjgX)

The first chunk of installs gives this:
   ...
   cabal: The following packages are likely to be broken by the reinstalls:
   QuickCheck-2.4.2
   haskell-platform-2012.4.0.0
   Use --force-reinstalls if you want to install anyway.

I don't understand how it can want to break the Haskell-platform,
sounds dangerous!

And the second this:
   G:\Cabalcabal install Boolean Craft3e Craft3e GLFW GLURaw GLUT
HTTP IORefCAS Me
   moTrie MonadCatchIO-mtl NumInstances ObjectName OpenGL OpenGLRaw
QuickCheck SDL
   SHA StateVar Tensor abstract-deque abstract-par active aeson alex
ansi-terminal
   array asn1-data attoparsec attoparsec-conduit base-unicode-symbols
base64-bytest
   ring bits-atomic blaze-builder blaze-builder-conduit blaze-html
blaze-markup bla
   ze-svg bmp buildwrapper byteorder cabal-dev case-insensitive cereal
certificate
   clientsession cmdargs colour comonad conduit contravariant cookie
cpphs cprng-ae
   s cpu criterion crypto-api crypto-conduit crypto-pubkey-types
cryptocipher crypt
   ohash css-text data-default date-cache diagrams-core diagrams-lib
diagrams-svg d
   list email-validate entropy erf failure fast-logger file-embed
filepath filesyst
   em-conduit ghc-paths gloss gtk2hs-buildtools
   Resolving dependencies...
   In order, the following would be installed:
   Boolean-0.1.1 (new package)
   ...
   cabal: The following packages are likely to be broken by the reinstalls:
   regex-posix-0.95.1
   regex-compat-0.95.1
   regex-posix-0.94.4
   regex-compat-0.93.1
   parsec-3.1.1
   fgl-5.4.2.4
   fgl-5.4.2.3
   QuickCheck-2.4.0.1
   network-2.3.1.0
   haskell-platform-2012.4.0.0
   cgi-3001.1.7.4
   HTTP-4000.2.5
   regex-posix-0.95.2
   regex-compat-0.95.1
   regex-posix-0.95.1
   regex-compat-0.95.1
   Use --force-reinstalls if you want to install anyway.

So I have a typical situation where it won't install, and gives an
option to –force, but that seems to lead to more problems?
Do I just have some packages which are intrinsically incompatible, and
I have to choose between them?

Not sure how to proceed. Any help or hints appreciated!  :-)

–––-
 Cabal install cabal-install
  Configuring Cabal-1.16.0.3...
  Warning: This package indirectly depends on multiple versions of the same
  package. This is highly likely to cause a compile failure.
  package process-1.1.0.1 requires base-4.5.0.0
  package pretty-1.1.1.0 requires base-4.5.0.0
  package old-time-1.1.0.0 requires base-4.5.0.0
  package old-locale-1.0.0.4 requires base-4.5.0.0
  package filepath-1.3.0.0 requires base-4.5.0.0
  package directory-1.1.0.2 requires base-4.5.0.0
  package deepseq-1.3.0.0 requires base-4.5.0.0
  package containers-0.4.2.1 requires base-4.5.0.0
  package bytestring-0.9.2.1 requires base-4.5.0.0
  package array-0.4.0.0 requires base-4.5.0.0
  package Win32-2.2.2.0 requires base-4.5.0.0
  package filepath-1.3.0.0 requires base-4.5.1.0
  package Cabal-1.16.0.3 requires base-4.5.1.0
  package Cabal-1.16.0.3 requires filepath-1.3.0.0
  package process-1.1.0.1 requires filepath-1.3.0.0
  package directory-1.1.0.2 requires filepath-1.3.0.0
  package integer-gmp-0.4.0.0 requires ghc-prim-0.2.0.0
  package bytestring-0.9.2.1 requires ghc-prim-0.2.0.0
  package base-4.5.0.0 requires ghc-prim-0.2.0.0
  package integer-gmp-0.4.0.0 requires ghc-prim-0.2.0.0
  package base-4.5.1.0 requires ghc-prim-0.2.0.0
  package base-4.5.1.0 requires integer-gmp-0.4.0.0
  package base-4.5.0.0 requires integer-gmp-0.4.0.0
  Building Cabal-1.16.0.3...
  Preprocessing library Cabal-1.16.0.3...
  command line: cannot satisfy -package-id
array-0.4.0.0-3cf1bc3f5cd0078adea24752c18081b9
  (use -v

Re: [Haskell-cafe] cabal install... Trying to recover

2012-11-21 Thread Brandon Allbery
On Wed, Nov 21, 2012 at 9:08 AM, Gregory Guthrie guth...@mum.edu wrote:

 The error seems odd to me (cabal-install-1.16.0.2 depends on
 Cabal-1.16.0.3 which failed to install.), that an older version depends on
 a newer one?


There was a minor bug in the Cabal library necessitating a point release.
 cabal-install was unaffected; why make a new release just to have pretty
versioning?


 I then tried to reload all my previous packages, (all at once?!), but it
 fails, out of memory (w/8GB of memory!)


i386 or x86-64?  8GB isn't really 8GB on the former.


 So I split it into sections, and tried the first one; it lists a lot of
 new installs, and then fails
   (full list at http://pastebin.com/5ywdUjgX)


You're explicitly asking it for a new version of HTTP, which is asking for
trouble.

More worrisome is that it's still asking for new versions of base, which
means it's still confused about what version of ghc is installed.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix/linux, openafs, kerberos, infrastructure  http://sinenomine.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install... Trying to recover

2012-11-21 Thread Gregory Guthrie
OK; I took HTTP out, but still get the same error;
cabal: The following packages are likely to be broken by the reinstalls:
QuickCheck-2.4.2
haskell-platform-2012.4.0.0
Use --force-reinstalls if you want to install anyway.

One thing I notice;
Ghc reports: G:\Cabalghc --version
 The Glorious Glasgow Haskell Compilation System, version 7.4.2

But I did notice that I had an environment variable (from some previous 
install, I think openCV?) of:
   GHC_VERSION=7.4.1
So I updated that to 7.4.2
And retried, same results.

But then, ghc-pkg check reports:
   The following packages are broken, either because they have a problem
   listed above, or because they depend on a broken package.
   HTTP-4000.2.3
   haskell-platform-2012.2.0.0

I have no idea where the 2012.2 comes from.
Any suggestions?

---
From: Brandon Allbery [mailto:allber...@gmail.com]
Subject: Re: [Haskell-cafe] cabal install... Trying to recover

So I split it into sections, and tried the first one; it lists a lot of new 
installs, and then fails
  (full list at http://pastebin.com/5ywdUjgX)

You're explicitly asking it for a new version of HTTP, which is asking for 
trouble.

More worrisome is that it's still asking for new versions of base, which means 
it's still confused about what version of ghc is installed.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install... Trying to recover

2012-11-21 Thread Brandon Allbery
On Wed, Nov 21, 2012 at 12:06 PM, Gregory Guthrie guth...@mum.edu wrote:

 OK; I took HTTP out, but still get the same error;

 cabal: The following packages are likely to be broken by the
 reinstalls:

 QuickCheck-2.4.2

 haskell-platform-2012.4.0.0

 Use --force-reinstalls if you want to install anyway.


Right, that was not intended to be a complete fix or anything, just a note.

This is the important part, and what I noted immediately afterward --- did
you happen to notice there was anything in the message after that first
part?  (Although I'm not asking this first so it also may not actually
exist, I guess)


 One thing I notice;

 Ghc reports: G:\Cabalghc --version

  The Glorious Glasgow Haskell Compilation System, version 7.4.2

 ** **

 But I did notice that I had an environment variable (from some previous
 install, I think openCV?) of:

GHC_VERSION=7.4.1

 So I updated that to 7.4.2

 And retried, same results.


There is more going on than just that environment variable; this is what
the base stuff that you have been ignoring is trying to tell you.

You still have both compilers installed, and their packages are somehow
jumbled together.  This is breaking your installation.  Unfortunately, as I
am neither particularly familiar with Windows nor able to access your
system (which is probably for the best for both of us), I can't really help
you with figuring out why you have two GHC versions' packages mixed
together.  But as long as you do, cabal will be trying to upgrade the
base package, which is the actual source of the breakage.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix/linux, openafs, kerberos, infrastructure  http://sinenomine.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install... Trying to recover

2012-11-21 Thread Gregory Guthrie
Thanks.

I’ll try to do another cleanup, but not sure what more I can uninstall or clean 
out!
I did a system search for *ghc* and came up empty before reinstall; will try 
again.

I have now managed to get from some broken packages to a broken system!  ☺

---
Subject: Re: [Haskell-cafe] cabal install... Trying to recover

This is the important part, and what I noted immediately afterward --- did you 
happen to notice there was anything in the message after that first part?  
(Although I'm not asking this first so it also may not actually exist, I 
guess)
  One thing I notice;
Ghc reports: G:\Cabalghc --version
 The Glorious Glasgow Haskell Compilation System, version 7.4.2
There is more going on than just that environment variable; this is what the 
base stuff that you have been ignoring is trying to tell you.

You still have both compilers installed, and their packages are somehow jumbled 
together.  This is breaking your installation.  Unfortunately, as I am neither 
particularly familiar with Windows nor able to access your system (which is 
probably for the best for both of us), I can't really help you with figuring 
out why you have two GHC versions' packages mixed together.  But as long as you 
do, cabal will be trying to upgrade the base package, which is the actual 
source of the breakage.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-21 Thread Richard O'Keefe
Let's put some numbers on this.

(1) In this country, you can buy a second-hand dual core desktop for NZD 200
(roughly USD 165, EUR 130).  You can buy a new laptop for NZD 400
(roughly USD 330, EUR 260).  Not fancy machines, but more than adequate
to compile and build stuff.  Shipping adds a fair bit to prices here.
So it _must_ be possible to buy a Windows box of some kind adequate for
compiling, building, and testing open source software, for even less
than that in North America or Europe.

It's really *NOT* the price of the box-with-Windows-installed.

(2) This department has a mix of Mac OS X, Linux (running on Apple dual-boot
boxes), and Windows (running on Apple dual-boot boxes).  The University
has quite a few Windows labs.   There would be _no_ students at this
University who did not have ready access to a Windows machine whenever
they wanted one.   The servers in the department all run some flavour of
UNIX, true.

(3) Given an intel Solaris, intel Linux, or intel Mac OS X box, VirtualBox
is free.  You can run Windows in VirtualBox.  Microsoft offer a full
Windows 7 Professional licence to University students for USD 30.  So
I really don't buy the idea of a student finding it hard to get Windows.
My University is part of the MSDN Academic Alliance, so staff get stuff
for no money of their own.

Windows 7 Home Premium is USD 200, Professional USD 300.  Probably better
to buy a cheap box that already has Windows.

What about software?

Well, Microsoft Visual Studio Professional 2012 is several times more expensive
than the box it runs on, and Office is not cheap either.  There are, as always,
special deals, e.g., 
https://www.dreamspark.com/Product/Product.aspx?productid=34
seems to make VC++ 2008 available free to students, and the MSDN Academic
Alliance makes this stuff easy for staff to get.  For everyone else,
Eclipse and NetBeans are free, and so are Cygwin and Mingw.

It took me about a day to download and install a large amount of free software,
giving me quite a decent environment.  (Of course, if someone were paying me to
do this, the University would charge NZD 150/hour, so free = NZD 1200 ...)
I even had Microsoft SUA (Services for Unix Applications -- think of it as
Cygwin from Microsoft but with a less horribly ugly terminal font).  I had ghc
and OCaml and SWI Prolog and Squeak and Dolphin Smalltalk and lots of good 
stuff.

So it's not really the availability of software either.

So am I a happy Windows hacker?

Actually, no.

I had a working tolerable setup under Windows Vista.   Despite its bad press, I
have to say I never had any trouble with Vista.  Then my (the department's) Mac
laptop needed something done to it -- I forget what -- and they said while
we're at it, it would simplify our lives if we upgraded the Windows side to
Windows 7 like everyone else has now.  I said, OK, but I _really_ don't want
to lose any of my programs.  And they lost everything beginning with the
letters M-Z, and what they didn't lose stopped working.  Apparently when
Windows went 64 bit they didn't leave \Program Files\ alone and add a
\Program Files 64\ directory.  Oh no!  Now \Program Files\ was exclusively
for 64-bit programs, and 32-bit ones were supposed to be in \Program Files 
(x86)\.
You can guess what that did to the surviving remnants of my environment.

How long did it take to rebuild my environment?
I don't know.  Except for installing Cygwin I haven't done it.
The changes to the user interface -- apparently just for the sake of change,
because absolutely nothing I do has become easier for me -- did nothing for
my facility with the system, and having to spend half an hour installing
updates every time I boot into Windows doesn't increase my enjoyment.
I don't want to even _think_ about Windows 8.





On 21/11/2012, at 3:21 PM, Clark Gaebel wrote:

 +1 to this. The friction of finding, setting up, and using Windows isn't even 
 comparable to just sshing into another unix box and testing something quickly.
 
 As a university student, I also find it relatively rare that I get to test on 
 a Windows machine. My personal computer runs linux, my technical friends run 
 linux or osx, and my non-technical ones run osx. Also, all the school servers 
 that I have access to run either FreeBSD or Linux.
 
 If I want to run something on linux system, I have about 40 different 
 computers that I can ssh into and run code on.
 
 If I want to run something on osx, I just have to call a friend and ask if 
 they can turn on their computer and allow me to ssh in (to my own account, of 
 course).
 
 If I want to run something on Windows, I have to track down a friend (in 
 person!), ask to borrow their computer for a few hours, get administrator 
 access to install the Haskell Platform, get frustrated that HP hasn't been 
 upgraded to 7.6, and give up.
 
 It's just not practical, especially for the large amount of small (500 LOC) 
 

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Andres Löh
Hi Johan.

I haven't looked in detail at the overall problem, but:

 Flags chosen: base3=True, base4=True

 Why is Cabal setting both base3 and base4 to True?

This looks completely fine to me.

The Cabal .cabal file is stating:

  if flag(base4) { build-depends: base = 4 } else { build-depends: base  4 }
  if flag(base3) { build-depends: base = 3 } else { build-depends: base  3 }

So it's relatively clear to me that both have to be true.

Cheers,
  Andres

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Gregory Guthrie
Thanks to all for the comparisons between apt  cabal.
Your reply basically explains why it is broken, and gives a rationale (cost and 
trouble to do it), but no prognosis for repair.

My interest is in using Haskell for teaching, and so far the package system 
failures often present problems that I can't solve for all but the simplest 
examples, so I couldn't much pass this onto students! My libraries may have 
gotten corrupted, so when I get time I will try to reset and clean out 
everything and start over, but that will of course break a lot of things and 
take a lot of time for some re-installs, most particularly things depending on 
underlying C libraries.

Any hints for a simple way to do this are welcome.

I look forward to the outcomes from the current cabal discussions.

It was also  interesting to note a comment that most developers don't have 
access to a Windows machine for testing. With Windows at 90% of the computing 
market (Linux = 1.6%), this seems like a problem which might limit growth of 
Haskell usage. Just an observation. :-)

Thanks for your article on the topic of Cabal - interesting!
--
Date: Tue, 20 Nov 2012 01:03:20 -0500
From: Albert Y. C. Lai tre...@vex.net
Subject: Re: [Haskell-cafe] Cabal failures...

At least I paid my 3 hours to explain some cabal stuff at
http://www.vex.net/~trebla/haskell/sicp.xhtml
--


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Alexander Solla
 Thanks to all for the comparisons between apt  cabal.
 Your reply basically explains why it is broken, and gives a rationale
 (cost and trouble to do it), but no prognosis for repair.


It's an open problem.

I make do with disposable sand-boxes, using cabal-dev to build them.  In
this way, I can keep many (of my) libraries building, even if different
libraries need incompatible versions of Hackage libraries.  If I run into a
problem in a library's build environment, I either fix it surgically or
nuke it, without affecting any other build environments.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Albert Y. C. Lai

On 12-11-20 08:48 AM, Gregory Guthrie wrote:

It was also  interesting to note a comment that most developers don't have access 
to a Windows machine for testing. With Windows at 90% of the computing market 
(Linux = 1.6%), this seems like a problem which might limit growth of Haskell 
usage. Just an observation. :-)


There is a paradox in that sentence.

The first sentence says, most developers don't have access to Windows 
machines for testing. But they have access to Linux machines. Then 
Windows machines must be a scarcity compared to Linux machines, no? So 
scarce, you even have difficulty borrowing or renting.


Then the next sentence says, the scarcity is the other way round, Linux 
machines are scarce, Windows machines are abundant. OK, so why is it so 
hard to access something abundant, and so easy to access something scarce?


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install...

2012-11-20 Thread Brandon Allbery
On Tue, Nov 20, 2012 at 4:10 PM, Gregory Guthrie guth...@mum.edu wrote:

 Hmm,

 Now when I tried to run Leksah, I get not only some broken packages (which
 I can avoid for my current project), but:

 ** **

 command line: cannot satisfy -package-id
 base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917: 

 base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917 is unusable due to
 missing or recursive dependencies:

   integer-gmp-0.4.0.0-c15e185526893c3119f809251aac8c5b

 (use -v for more information)

 ** **

 So I tried to install base, then re-install it, but both fail;


You can't install base or integer-gmp from cabal-install.  They are wired
into the compiler, and the only way to reinstall them is to reinstall ghc.
 In fact, finding a way to install ether from cabal-install will cause the
kind of breakage you're seeing.  (It's not supposed to be possible, at
least for base.  If at some point you installed integer-gmp from hackage,
you need to remove it; if you installed it into the global package
database, you really do have no choice but remove and reinstall ghc now.)

If you installed ghc as part of the haskell platform, then you need to
remove and reinstall that.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix/linux, openafs, kerberos, infrastructure  http://sinenomine.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Gregory Guthrie
No; the first sentence says that someone else had reported that testing on 
Windows was hard to do because of (a perceived) lack of access to Windows by 
Haskell developers... The implication is that Haskell developers (only/mainly) 
use *nix.
I commented that if true this lack of Windows testing could limit the 
availability of Haskell to the largest market share of users.

---
 Subject: Re: [Haskell-cafe] Cabal failures...
 To: haskell-cafe@haskell.org
 
 On 12-11-20 08:48 AM, Gregory Guthrie wrote:
  It was also  interesting to note a comment that most developers don't
  have access to a Windows machine for testing. With Windows at 90% of
  the computing market (Linux = 1.6%), this seems like a problem which
  might limit growth of Haskell usage. Just an observation. :-)
 
 There is a paradox in that sentence.
 
 The first sentence says, most developers don't have access to Windows 
 machines for
 testing. But they have access to Linux machines. Then Windows machines must 
 be a scarcity
 compared to Linux machines, no? So scarce, you even have difficulty borrowing 
 or renting.
 
 Then the next sentence says, the scarcity is the other way round, Linux 
 machines are scarce,
 Windows machines are abundant. OK, so why is it so hard to access something 
 abundant, and
 so easy to access something scarce?
 --

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install...

2012-11-20 Thread Johan Tibell
On Tue, Nov 20, 2012 at 1:10 PM, Gregory Guthrie guth...@mum.edu wrote:

 Hmm,

 Now when I tried to run Leksah, I get not only some broken packages (which
 I can avoid for my current project), but:

 ** **

 command line: cannot satisfy -package-id
 base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917: 

 base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917 is unusable due to
 missing or recursive dependencies:

   integer-gmp-0.4.0.0-c15e185526893c3119f809251aac8c5b

 (use -v for more information)

 ** **

 So I tried to install base, then re-install it, but both fail;

 Any hints?


From this email and some of the previous emails it seems that your package
DB is in a pretty bad state, most likely from using --force-reinstalls.
When Cabal warns you that this will break stuff it actually means it. :) My
suggestion is that you

rm -rf  ~/.ghc/x86_64-linux-7.6.1  # or equivalent on your system.

Then reinstall all the packages you want by listing them all at once

cabal install pkg1 pkg2 pk3

By listing them all together cabal-install tries to come up with an install
plan that is globally consistent for all of them.

-- Johan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install...

2012-11-20 Thread Eric Velten de Melo
I have a dream of one day being able to install leksah without having
to downgrade ghc. Right now I can't even install cabal-dev with cabal.
It will break ghc if I do.

2012/11/20 Johan Tibell johan.tib...@gmail.com:
 On Tue, Nov 20, 2012 at 1:10 PM, Gregory Guthrie guth...@mum.edu wrote:

 Hmm,

 Now when I tried to run Leksah, I get not only some broken packages (which
 I can avoid for my current project), but:



 command line: cannot satisfy -package-id
 base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917:

 base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917 is unusable due to
 missing or recursive dependencies:

   integer-gmp-0.4.0.0-c15e185526893c3119f809251aac8c5b

 (use -v for more information)



 So I tried to install base, then re-install it, but both fail;

 Any hints?


 From this email and some of the previous emails it seems that your package
 DB is in a pretty bad state, most likely from using --force-reinstalls. When
 Cabal warns you that this will break stuff it actually means it. :) My
 suggestion is that you

 rm -rf  ~/.ghc/x86_64-linux-7.6.1  # or equivalent on your system.

 Then reinstall all the packages you want by listing them all at once

 cabal install pkg1 pkg2 pk3

 By listing them all together cabal-install tries to come up with an install
 plan that is globally consistent for all of them.

 -- Johan


 ___
 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


Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Albert Y. C. Lai

On 12-11-20 05:37 PM, Gregory Guthrie wrote:

No; the first sentence says that someone else had reported that testing on 
Windows was hard to do because of (a perceived) lack of access to Windows by 
Haskell developers... The implication is that Haskell developers (only/mainly) 
use *nix.
I commented that if true this lack of Windows testing could limit the 
availability of Haskell to the largest market share of users.


Clearly, since 90% of computers have Windows, it should be trivial to 
find one to test on, if a programmer wants to. Surely every programmer 
is surrounded by Windows-using family and friends? (Perhaps to the 
programmer's dismay, too, because the perpetual I've got a virus again, 
can you help? is so annoying?) We are not talking about BeOS.


Therefore, if programmers do not test on Windows, it is because they do 
not want to.


And why would they want to?

Take webapp programmers for example. 99.999...% [1] of computers have 
sufficiently new web browsers. This market share is even higher than 
Windows. At the server side, the programmers have freedom in choosing 
the OS, and apparently, they choose anything but Windows, and this has 
never limited them in accessing 99.999...% of computer users.


And this, 99.999...% web browser market share, is exactly driving 
Haskell growth. Not the petty 90% Windows slice.


[1] http://en.wikipedia.org/wiki/0.999...

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Johan Tibell
On Tue, Nov 20, 2012 at 5:14 PM, Albert Y. C. Lai tre...@vex.net wrote:

 On 12-11-20 05:37 PM, Gregory Guthrie wrote:

 No; the first sentence says that someone else had reported that testing
 on Windows was hard to do because of (a perceived) lack of access to
 Windows by Haskell developers... The implication is that Haskell developers
 (only/mainly) use *nix.
 I commented that if true this lack of Windows testing could limit the
 availability of Haskell to the largest market share of users.


 Clearly, since 90% of computers have Windows, it should be trivial to
 find one to test on, if a programmer wants to. Surely every programmer is
 surrounded by Windows-using family and friends? (Perhaps to the
 programmer's dismay, too, because the perpetual I've got a virus again,
 can you help? is so annoying?) We are not talking about BeOS.

 Therefore, if programmers do not test on Windows, it is because they do
 not want to.


This logic is flawed. More than 90% of computers having Windows doesn't
imply that 90% of all computers in a given household runs Windows. What's
the probability that your household has a Windows computer if you're a
programmer that don't live with your parents? What if that programmer is an
open source contributor. Surely not 90%.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Darren Grant
Why not? Either way, I am chiming in as a programmer of many years. Unless
using osx I stick with windows to avoid half-day forays into nettling
technical issues that are not related to the work I am paid to perform. I
would love for Haskell to work better there.
On Nov 20, 2012 5:21 PM, Johan Tibell johan.tib...@gmail.com wrote:

 On Tue, Nov 20, 2012 at 5:14 PM, Albert Y. C. Lai tre...@vex.net wrote:

 On 12-11-20 05:37 PM, Gregory Guthrie wrote:

 No; the first sentence says that someone else had reported that testing
 on Windows was hard to do because of (a perceived) lack of access to
 Windows by Haskell developers... The implication is that Haskell developers
 (only/mainly) use *nix.
 I commented that if true this lack of Windows testing could limit the
 availability of Haskell to the largest market share of users.


 Clearly, since 90% of computers have Windows, it should be trivial to
 find one to test on, if a programmer wants to. Surely every programmer is
 surrounded by Windows-using family and friends? (Perhaps to the
 programmer's dismay, too, because the perpetual I've got a virus again,
 can you help? is so annoying?) We are not talking about BeOS.

 Therefore, if programmers do not test on Windows, it is because they do
 not want to.


 This logic is flawed. More than 90% of computers having Windows doesn't
 imply that 90% of all computers in a given household runs Windows. What's
 the probability that your household has a Windows computer if you're a
 programmer that don't live with your parents? What if that programmer is an
 open source contributor. Surely not 90%.


 ___
 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


Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Albert Y. C. Lai

On 12-11-20 08:20 PM, Johan Tibell wrote:

This logic is flawed. More than 90% of computers having Windows doesn't
imply that 90% of all computers in a given household runs Windows.
What's the probability that your household has a Windows computer if
you're a programmer that don't live with your parents? What if that
programmer is an open source contributor. Surely not 90%.


This counter-argument is flawed. Why limit oneself to one's own 
household? (Garage? Basement?) Get out more! Visit a friend. Talk to an 
internet cafe owner for a special deal to run one's own programs. Rent 
virtual machine time in the cloud. There are many creative, flexible, 
low-cost possibilities.


If one wants to.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Johan Tibell
On Tue, Nov 20, 2012 at 5:34 PM, Albert Y. C. Lai tre...@vex.net wrote:

 This counter-argument is flawed. Why limit oneself to one's own household?
 (Garage? Basement?) Get out more! Visit a friend. Talk to an internet cafe
 owner for a special deal to run one's own programs. Rent virtual machine
 time in the cloud. There are many creative, flexible, low-cost
 possibilities.

 If one wants to.


Clearly this different approaches have different costs. Fixing a bug from
my couch or asking some stranger at a cafe if I can install msys is quite
different things.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Erik de Castro Lopo
Albert Y. C. Lai wrote:

 Clearly, since 90% of computers have Windows, it should be trivial to 
 find one to test on, if a programmer wants to. Surely every programmer 
 is surrounded by Windows-using family and friends? (Perhaps to the 
 programmer's dismay, too, because the perpetual I've got a virus again, 
 can you help? is so annoying?) We are not talking about BeOS.
 
 Therefore, if programmers do not test on Windows, it is because they do 
 not want to.

I have been an open source contributor for over 15 years. All the general
purpose machines in my house run Linux. My father's and my mother-in-law's
computers also run Linux (easier for me to provide support). For testing
software, I have a PowerPC machine and virtual machines running various
versions of Linux, FreeBSD and OpenBSD.

What I don't have is a windows machine. I have, at numerous times, spent
considerable amounts of time (and even real money for licenses) setting
up (or rather trying to) windows in a VM and it is *always* considerably
more work to set up, maintain and fix when something goes wrong. Setting
up development tools is also a huge pain in the ass. And sooner or later
they fail in some way I can't fix and I have to start again. Often its
not worth the effort.

At my day job we have on-demand windows VMs, but I am not officially
allowed (nor do I intend to start) to use those resources for my open
source work.

So is it difficult for an open source contributor to test on windows?
Hell yes! You have no idea how hard windows is in comparison to say
FreeBSD. Even Apple's OS X is easier than windows, because I have
friends who can give me SSH access to their machines.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Erik de Castro Lopo
Albert Y. C. Lai wrote:

 This counter-argument is flawed. Why limit oneself to one's own 
 household? (Garage? Basement?) Get out more! Visit a friend.

If that friend is not a coder, they are unlikely to have the dev tools
installed.

 Talk to an 
 internet cafe owner for a special deal to run one's own programs.

Ditto.

 Rent virtual machine time in the cloud.

I've already thrown a bunch of money at the microsoft machine for very 
poor results. If someone else set up and ran windows VMs and gave me
access that would make testing on windows far more attractive.

I just found that Amazon AWS has a free teir that includes windows
as an option:

https://aws.amazon.com/free/

Its still a huge sink of time and effort to set one up to a state where
its ready to build haskell packages. Maybe if someone set up a github
project that contained a script that could be downloaded onto a bare
windows machine and then bootstrap that machine into a full haskell dev
machine you might see some progress on this front.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Clark Gaebel
+1 to this. The friction of finding, setting up, and using Windows isn't
even comparable to just sshing into another unix box and testing something
quickly.

As a university student, I also find it relatively rare that I get to test
on a Windows machine. My personal computer runs linux, my technical friends
run linux or osx, and my non-technical ones run osx. Also, all the school
servers that I have access to run either FreeBSD or Linux.

If I want to run something on linux system, I have about 40 different
computers that I can ssh into and run code on.

If I want to run something on osx, I just have to call a friend and ask if
they can turn on their computer and allow me to ssh in (to my own account,
of course).

If I want to run something on Windows, I have to track down a friend (in
person!), ask to borrow their computer for a few hours, get administrator
access to install the Haskell Platform, get frustrated that HP hasn't been
upgraded to 7.6, and give up.

It's just not practical, especially for the large amount of small (500
LOC) packages on Hackage.

  - Clark


On Tue, Nov 20, 2012 at 9:05 PM, Erik de Castro Lopo
mle...@mega-nerd.comwrote:

 Albert Y. C. Lai wrote:

  Clearly, since 90% of computers have Windows, it should be trivial to
  find one to test on, if a programmer wants to. Surely every programmer
  is surrounded by Windows-using family and friends? (Perhaps to the
  programmer's dismay, too, because the perpetual I've got a virus again,
  can you help? is so annoying?) We are not talking about BeOS.
 
  Therefore, if programmers do not test on Windows, it is because they do
  not want to.

 I have been an open source contributor for over 15 years. All the general
 purpose machines in my house run Linux. My father's and my mother-in-law's
 computers also run Linux (easier for me to provide support). For testing
 software, I have a PowerPC machine and virtual machines running various
 versions of Linux, FreeBSD and OpenBSD.

 What I don't have is a windows machine. I have, at numerous times, spent
 considerable amounts of time (and even real money for licenses) setting
 up (or rather trying to) windows in a VM and it is *always* considerably
 more work to set up, maintain and fix when something goes wrong. Setting
 up development tools is also a huge pain in the ass. And sooner or later
 they fail in some way I can't fix and I have to start again. Often its
 not worth the effort.

 At my day job we have on-demand windows VMs, but I am not officially
 allowed (nor do I intend to start) to use those resources for my open
 source work.

 So is it difficult for an open source contributor to test on windows?
 Hell yes! You have no idea how hard windows is in comparison to say
 FreeBSD. Even Apple's OS X is easier than windows, because I have
 friends who can give me SSH access to their machines.

 Erik
 --
 --
 Erik de Castro Lopo
 http://www.mega-nerd.com/

 ___
 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


Re: [Haskell-cafe] Cabal failures...

2012-11-19 Thread Johan Tibell
Hi Greg,

On Mon, Nov 19, 2012 at 1:25 PM, Gregory Guthrie guth...@mum.edu wrote:

 I follow the Cabal-messes threads with some interest, since that is the
 hardest area for me since starting to use Haskell. Probably 40-60% of all
 package install fail for some mysterious reason, with threats that trying
  to fix them will break more things, which generally is true. :-)


We're working on it. Be brave, things are going to get better!


 I am not exert in the area, but I wonder how /why/ this is different than
 other package managers, like apt in Linux, I have never had any problems
 with it, and I would think that their dependencies are of at least similar
 complexities.


The Linux package managers solve a different problems. They let you install
a set of packages that have been manually curated and are know to work
together (i.e. all version dependencies are fixed) while cabal does version
resolution on packages that might not ever have been tried together. If you
install Haskell packages via your distro's package manager I assume they
will always install cleanly. The problem is that people want the latest
bleeding edge of packages, which haven't made it into the distros yet, and
hence they get to experience some of the pains associated with being on the
bleeding edge. Being on Windows also makes things harder, as most
developers don't have a Windows box to test their stuff on.


 In any case; Trying to do a cabal update I was told to try to update
 cabal-install, which I think means actually updating cabal (since I
 actually run installs via cabal install...), but that fails with this
 message below, and I don't know how to proceed.


cabal-install is the package that includes the cabal executable. Cabal
(with a capital C) is the library that cabal-install uses. The naming is
unfortunate but hard to change at this point. To update cabal-install you
do:

$ cabal update  cabal install cabal-install

Make sure that the place that the cabal binary gets installed into (which
is printed at the end of the install) is on your PATH.


 Linking
 C:\Users\guthrie\AppData\Local\Temp\Cabal-1.16.0.3-13880\Cabal-1.16.0.3\dist\setup\setup.exe
 ...
 Configuring Cabal-1.16.0.3...
 Warning: This package indirectly depends on multiple versions of the same
 package. This is highly likely to cause a compile failure.


This is a sure sign that things are not going to work well. Could you
include the output of

cabal install -v cabal-install

please. The output here is not enough to tell me what's going on. Please
also include the output of

cabal --version
ghc --version

Are you using the Haskell Platform, if so, which version?

-- Johan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-19 Thread Greg Fitzgerald
 cabal install -v cabal-install

Not sure if you're running into this one, but a configuration that
wasn't working for me:

1) Install Haskell Platform
2) Install GHC 7.6.1
3) cabal install cabal-install

As I recall, the error had something to do with a Cabal-generated
'Paths' file assuming the Prelude exported 'catch'.  It was affecting
a bunch of other packages too, which forced me to upgrade
cabal-install.

To get things working, I had to boot GHC 7.6 from my system PATH,
upgrade cabal-install using GHC 7.4, and then put 7.6 back in the
system path.  After doing that, everything has worked well with GHC
7.6.

-Greg


On Mon, Nov 19, 2012 at 1:38 PM, Johan Tibell johan.tib...@gmail.com wrote:
 Hi Greg,

 On Mon, Nov 19, 2012 at 1:25 PM, Gregory Guthrie guth...@mum.edu wrote:

 I follow the Cabal-messes threads with some interest, since that is the
 hardest area for me since starting to use Haskell. Probably 40-60% of all
 package install fail for some mysterious reason, with threats that trying
 to fix them will break more things, which generally is true. :-)


 We're working on it. Be brave, things are going to get better!


 I am not exert in the area, but I wonder how /why/ this is different than
 other package managers, like apt in Linux, I have never had any problems
 with it, and I would think that their dependencies are of at least similar
 complexities.


 The Linux package managers solve a different problems. They let you install
 a set of packages that have been manually curated and are know to work
 together (i.e. all version dependencies are fixed) while cabal does version
 resolution on packages that might not ever have been tried together. If you
 install Haskell packages via your distro's package manager I assume they
 will always install cleanly. The problem is that people want the latest
 bleeding edge of packages, which haven't made it into the distros yet, and
 hence they get to experience some of the pains associated with being on the
 bleeding edge. Being on Windows also makes things harder, as most developers
 don't have a Windows box to test their stuff on.


 In any case; Trying to do a cabal update I was told to try to update
 cabal-install, which I think means actually updating cabal (since I
 actually run installs via cabal install...), but that fails with this
 message below, and I don't know how to proceed.


 cabal-install is the package that includes the cabal executable. Cabal
 (with a capital C) is the library that cabal-install uses. The naming is
 unfortunate but hard to change at this point. To update cabal-install you
 do:

 $ cabal update  cabal install cabal-install

 Make sure that the place that the cabal binary gets installed into (which
 is printed at the end of the install) is on your PATH.


 Linking
 C:\Users\guthrie\AppData\Local\Temp\Cabal-1.16.0.3-13880\Cabal-1.16.0.3\dist\setup\setup.exe
 ...
 Configuring Cabal-1.16.0.3...
 Warning: This package indirectly depends on multiple versions of the same
 package. This is highly likely to cause a compile failure.


 This is a sure sign that things are not going to work well. Could you
 include the output of

 cabal install -v cabal-install

 please. The output here is not enough to tell me what's going on. Please
 also include the output of

 cabal --version
 ghc --version

 Are you using the Haskell Platform, if so, which version?

 -- Johan


 ___
 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


Re: [Haskell-cafe] Cabal failures...

2012-11-19 Thread Johan Tibell
On Mon, Nov 19, 2012 at 2:55 PM, Greg Fitzgerald gari...@gmail.com wrote:

  cabal install -v cabal-install

 Not sure if you're running into this one, but a configuration that
 wasn't working for me:

 1) Install Haskell Platform
 2) Install GHC 7.6.1
 3) cabal install cabal-install

 As I recall, the error had something to do with a Cabal-generated
 'Paths' file assuming the Prelude exported 'catch'.  It was affecting
 a bunch of other packages too, which forced me to upgrade
 cabal-install.

 To get things working, I had to boot GHC 7.6 from my system PATH,
 upgrade cabal-install using GHC 7.4, and then put 7.6 back in the
 system path.  After doing that, everything has worked well with GHC
 7.6.


The issue is that cabal-install-1.16.0.1 is broken on Windows. We have a
new, fixed cabal-install-1.16.0.2 out, but if you were unlucky enough to
install the broken one you need to delete that binary and install
cabal-install again (either by using the bootstrap.sh script in the
cabal-install repo or by some other means).
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-19 Thread Gregory Guthrie
Thanks for looking at this and the help;
Trying with topdown changes things, but as often is the case warns that it 
will break another ~60 packages if I force it, not sure if this will help me or 
cause the ruin of the rest of the local Haskell library universe.

Should I force it?!  :-)

C:\Users\guthriecabal install -v --solver=topdown cabal-install
Reading available packages...
Resolving dependencies...
In order, the following would be installed:
Win32-2.2.2.0 (reinstall) changes: base-4.5.0.0 - 4.5.1.0
array-0.4.0.0 (reinstall) changes: base-4.5.0.0 - 4.5.1.0
deepseq-1.3.0.0 (reinstall) changes: base-4.5.0.0 - 4.5.1.0
containers-0.4.2.1 (reinstall) changes: base-4.5.0.0 - 4.5.1.0
old-locale-1.0.0.4 (reinstall) changes: base-4.5.0.0 - 4.5.1.0
old-time-1.1.0.0 (reinstall) changes: base-4.5.0.0 - 4.5.1.0
directory-1.1.0.2 (reinstall) changes: base-4.5.0.0 - 4.5.1.0
pretty-1.1.1.0 (reinstall) changes: base-4.5.0.0 - 4.5.1.0
process-1.1.0.1 (reinstall) changes: base-4.5.0.0 - 4.5.1.0
Cabal-1.16.0.3 (new version)
text-0.11.2.3 (reinstall)
parsec-3.1.3 (reinstall)
network-2.4.0.1 (new version)
HTTP-4000.2.5 (reinstall) changes: network-2.3.1.0 - 2.4.0.1
time-1.4 (reinstall) changes: base-4.5.0.0 - 4.5.1.0
random-1.0.1.1 (reinstall) changes: base-4.5.0.0 - 4.5.1.0
cabal-install-1.16.0.2 -bytestring-in-base (new package)
cabal: The following packages are likely to be broken by the reinstalls:
QuickCheck-2.4.2
haskell98-2.0.0.1
ghc-7.4.1
Cabal-1.14.0
bin-package-db-0.0.0.0
hpc-0.5.1.1
haskell-platform-2012.4.0.0
QuickCheck-2.5.1.1
haskell98-2.0.0.1
ghc-7.4.2
Cabal-1.14.0
bin-package-db-0.0.0.0
hpc-0.5.1.1
text-0.11.2.0
parsec-3.1.2
stm-2.3
regex-posix-0.95.1
regex-compat-0.95.1
regex-base-0.93.2
parallel-3.2.0.2
haskell2010-1.1.0.1
haskell-src-1.0.1.5
fgl-5.4.2.4
template-haskell-2.7.0.0
hoopl-3.8.7.3
binary-0.5.1.0
GLUT-2.1.2.1
network-2.3.1.0
cgi-3001.1.7.4
blaze-builder-0.3.1.0
stm-2.4
async-2.0.1.3
regex-posix-0.95.2
regex-compat-0.95.1
regex-base-0.93.2
parallel-3.2.0.3
haskell2010-1.1.0.1
haskell-src-1.0.1.5
fgl-5.4.2.4
vector-0.10.0.1
vector-algorithms-0.5.4.2
math-functions-0.1.1.2
template-haskell-2.7.0.0
hoopl-3.8.7.3
binary-0.5.1.0
GLUT-2.1.2.1
HUnit-1.2.5.1
Use --force-reinstalls if you want to install anyway.

---

From: Johan Tibell [mailto:johan.tib...@gmail.com] 
Cc: haskell-cafe@haskell.org; Andres Löh
Subject: Re: [Haskell-cafe] Cabal failures...

I'm not quite sure what's going on. I've CCed Andres, who wrote the new 
constraint solver.

One especially confusing part is this:

C:\Users\guthrie\AppData\Local\Temp\Cabal-1.16.0.3-12392\Cabal-1.16.0.3\dist\set
up\setup.exe
configure --verbose=2 --ghc --prefix=C:\Users\guthrie\AppData\Roaming\cabal
--user --flags=base4 --flags=base3 --constraint=process ==1.1.0.1
--constraint=pretty ==1.1.1.0 --constraint=old-time ==1.1.0.0
--constraint=filepath ==1.3.0.0 --constraint=directory ==1.1.0.2
--constraint=containers ==0.4.2.1 --constraint=base ==4.5.1.0
--constraint=array ==0.4.0.0 --disable-tests --disable-benchmarks
Configuring Cabal-1.16.0.3...
Flags chosen: base3=True, base4=True
Dependency array ==0.4.0.0: using array-0.4.0.0
Dependency base ==4.5.1.0: using base-4.5.1.0
Dependency containers ==0.4.2.1: using containers-0.4.2.1
Dependency directory ==1.1.0.2: using directory-1.1.0.2
Dependency filepath ==1.3.0.0: using filepath-1.3.0.0
Dependency old-time ==1.1.0.0: using old-time-1.1.0.0
Dependency pretty ==1.1.1.0: using pretty-1.1.1.0
Dependency process ==1.1.0.1: using process-1.1.0.1
Warning: This package indirectly depends on multiple versions of the same
package. This is highly likely to cause a compile failure.

Why is Cabal setting both base3 and base4 to True?

P.S. You can try the same command with --solver=topdown and see if that works.

On Mon, Nov 19, 2012 at 8:22 PM, Gregory Guthrie guth...@mum.edu wrote:
Johan, thanks for the note and information.
 
My setup is: (Windows 7)
cabal-install version 0.14.0
using version 1.14.0 of the Cabal library
The Glorious Glasgow Haskell Compilation System, version 7.4.2
Haskell Platform 2012.4.0.0
 .
cabal-install-1.16.0.2 depends on Cabal-1.16.0.3 which failed to install.
 
 
---
 


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal failures...

2012-11-19 Thread Albert Y. C. Lai

On 12-11-19 04:25 PM, Gregory Guthrie wrote:

I am not exert in the area, but I wonder how /why/ this is different than other 
package managers, like apt in Linux, I have never had any problems with it, and 
I would think that their dependencies are of at least similar complexities.


I feel very strongly about the dissonance in comparing problems without 
comparing costs.


Debian has a horde of volunteers for just the menial and manual work of 
perpetually finding one coherent set of versions so end users don't have 
to. And in practice, There is never one coherent set of versions. There 
is only a not-too-incoherent set of versions, and the volunteers first 
have to decide on it, and then manually pick patches from other versions 
(backporting patches, cherry-picking patches) to turn the 
not-too-incoherent set into a coherent set that does not exist in any 
pristine version.


On top of that, Mark Shuttleworth actually pays money for Ubuntu to 
start from Debian and further test the set, pick some more patches, 
unpick some other patches...


How many hours and/or dollars are you willing to pay for the menial, 
manual, perpetual chore of identifying coherent sets of versions so 
other people don't have to? And if a coherent set does not exist, how 
many are you willing to pay for backporting patches?


At least I paid my 3 hours to explain some cabal stuff at
http://www.vex.net/~trebla/haskell/sicp.xhtml

Even the Haskell Platform, one very small set, costs volunteer hours.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-install-1.16.0.2

2012-10-15 Thread Johan Tibell
On Mon, Oct 15, 2012 at 7:16 PM, Johan Tibell johan.tib...@gmail.com wrote:
 Hi all,

 I've created bug fix release candidates for Cabal and cabal-install to
 address the bugs found after the release.

Here's the list of fixed bugs:

Fixed since cabal-install-1.16.0:

 * Fix installing from custom folder on Linux (#1058)
 * Change bootstrap.sh to require Cabal = 1.16   1.18
 * Bump cabal-install version number to 1.16.0.1
 * Bump network dependency in bootstrap.sh to 2.3.1.1
 * Fix compilation error
 * Disable setting the jobs: $nprocs line in default ~/.cabal config
 * Fix building cabal-install with ghc-6.12 and older

Fixed since Cabal-1.16.0.1:

 * Bump Cabal version number to 1.16.0.2
 * Fixed warnings on the generated Paths module. The warnings are
generated by the flag '-fwarn-missing-import-lists'.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal-install-1.16.0.2

2012-10-15 Thread Andrés Sicard-Ramírez
Hi Johan,

On Mon, Oct 15, 2012 at 10:18 PM, Johan Tibell johan.tib...@gmail.com wrote:

 Fixed since Cabal-1.16.0.1:

  * Fixed warnings on the generated Paths module. The warnings are
 generated by the flag '-fwarn-missing-import-lists'.

I tested this issue with Cabal-1.16.0.2 and the issue was fixed.

Thanks,

-- 
Andrés

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal dependencies

2012-10-06 Thread Yuras Shumovich
On Sat, 2012-10-06 at 17:02 +0200, José Lopes wrote:
 Hello,
Hello
 
 I'm trying to understand Cabal dependencies.
 Why does the following situation happen?

xmobar-0.15 depends on mtl-2.0.* and needs parsec

All packages that will be broken, depends on parsec.
But parsec is compiled with mtl-2.1.1
To install xmobar, cabal needs to reinstall parsec with mtl-2.0.1.0

Thanks,
Yuras

 
 # cabal install xmobar --dry-run
 Resolving dependencies...
 In order, the following would be installed:
 parsec-3.1.3 (reinstall) changes: mtl-2.1.1 - 2.0.1.0
 xmobar-0.15 (new package)
 Warning: The following packages are likely to be broken by the reinstalls:

 Best regards,
 José
 



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal dependencies

2012-10-06 Thread José Lopes

OK.

But, wouldn't it be possible for xmobar to use mtl-2.0.1.0 and for 
parsec to use mtl-2.1.1, while xmobar would use this parsec version?
In this case, I am assuming that mtl-2.0.1.0 and mtl-2.1.1 are 
considered two different libraries.


Thanks,
José

On 06-10-2012 17:17, Yuras Shumovich wrote:

On Sat, 2012-10-06 at 17:02 +0200, José Lopes wrote:

Hello,

Hello

I'm trying to understand Cabal dependencies.
Why does the following situation happen?

xmobar-0.15 depends on mtl-2.0.* and needs parsec

All packages that will be broken, depends on parsec.
But parsec is compiled with mtl-2.1.1
To install xmobar, cabal needs to reinstall parsec with mtl-2.0.1.0

Thanks,
Yuras


# cabal install xmobar --dry-run
Resolving dependencies...
In order, the following would be installed:
parsec-3.1.3 (reinstall) changes: mtl-2.1.1 - 2.0.1.0
xmobar-0.15 (new package)
Warning: The following packages are likely to be broken by the reinstalls:
Best regards,
José





--
José António Branquinho de Oliveira Lopes
Instituto Superior Técnico
Technical University of Lisbon


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


  1   2   3   4   5   6   7   8   >