Re: [Haskell-cafe] Cabal -j

2010-06-03 Thread Louis Wasserman
Heh, I'm interested in both, but I'm feeling like I needed a new project,
and I thought this might make a good one =)

Louis Wasserman
wasserman.lo...@gmail.com
http://profiles.google.com/wasserman.louis


On Thu, Jun 3, 2010 at 5:42 PM, Don Stewart  wrote:

> chrisdone:
> > On 4 June 2010 00:05, Don Stewart  wrote:
> > > wasserman.louis:
> > >> What, if anything, stands in the way of parallelizing Cabal installs,
> make -j
> > >> style?
> > >
> > > Parallelizing ghc --make
> > >
> > >http://vimeo.com/6572966
> >
> > Unless Louis meant what's stopping cabal-install from installing
> > dependancies in parallel instead of serial? In which case; nothing?
> >
>
> Oh, sorry, dependencies (package level parallelism) vs modules (ghc --make
> level parallelism)
>
> -- don
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal -j

2010-06-03 Thread Marc Weber
Excerpts from Christopher Done's message of Fri Jun 04 00:39:23 +0200 2010:
> On 4 June 2010 00:05, Don Stewart  wrote:
> > wasserman.louis:
> >> What, if anything, stands in the way of parallelizing Cabal installs, make 
> >> -j
> >> style?
> >
> > Parallelizing ghc --make
> >
> >    http://vimeo.com/6572966
> 
> Unless Louis meant what's stopping cabal-install from installing
> dependancies in parallel instead of serial? In which case; nothing?

I think cabal-install compiles Setup without starting ghc or such (I may
be wrong). This would be fixable.

If you want to volunteer try hack-nix. It's based on the Nix
distribution system which provides this feature natively. You can even
ask others computers to help building dependencies quite easily.

Downside: At the moment it will pull all depndencies (including kernel
headers and glibc..) if you install it on a common linux system.

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


Re: [Haskell-cafe] Cabal -j

2010-06-03 Thread Evan Laforge
On Thu, Jun 3, 2010 at 3:05 PM, Don Stewart  wrote:
> wasserman.louis:
>> What, if anything, stands in the way of parallelizing Cabal installs, make -j
>> style?
>
> Parallelizing ghc --make
>
>    http://vimeo.com/6572966

Something I wondered from watching that talk, rather than trying to
make ghc run concurrently internally, can we just have --make, when
faced with multiple possibilities, pick the first one without a
'ModuleName.working' file, create such a working file, and then go to?

Then you can run 'ghc --make X.hs &; ghc --make X.hs &; ...'.

In fact, isn't that what make -j already does?  I could try it with
the old style 'ghc -M' and pure makefile, but it turns out to be a lot
of work to figure out what packages to include and tangle out the
right .o files and whatnot, work that --make does for me.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal -j

2010-06-07 Thread Louis Wasserman
Hmmm.  Now that I've had a chance to rewatch the video, I am enlightened.

Nevertheless, I will confess that I wouldn't mind the idea of just doing an
external parallelism wrapper, running multiple sessions of GHC rather than
making GHC internally parallel.  Hm.

Louis Wasserman
wasserman.lo...@gmail.com
http://profiles.google.com/wasserman.louis


On Thu, Jun 3, 2010 at 11:57 PM, Evan Laforge  wrote:

>
> Something I wondered from watching that talk, rather than trying to
> make ghc run concurrently internally, can we just have --make, when
> faced with multiple possibilities, pick the first one without a
> 'ModuleName.working' file, create such a working file, and then go to?
>
> Then you can run 'ghc --make X.hs &; ghc --make X.hs &; ...'.
>
> In fact, isn't that what make -j already does?  I could try it with
> the old style 'ghc -M' and pure makefile, but it turns out to be a lot
> of work to figure out what packages to include and tangle out the
> right .o files and whatnot, work that --make does for me.
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] cabal, Setup.lhs example

2010-07-19 Thread Tom Hawkins
I have a script I'm using to generate some Haskell code for a library.
 How do I specify this flow in the cabal setup file?  Would someone
point me to a relevant library I can reference as an example?

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


[Haskell-cafe] Cabal LD errors

2010-08-01 Thread wren ng thornton
So I'm getting some weird linking errors from cabal-install when doing 
`cabal configure && cabal build`


ld warning: atom sorting error for 
_postazm0zi2zi0_DataziMonoidziOrdziArgmax_Max_closure_tbl and 
_postazm0zi2zi0_DataziMonoidziOrdziArgmax_Min_closure_tbl in 
dist/build/Data/Monoid/Ord/Argmax.o


ld warning: atom sorting error for 
_postazm0zi2zi0_DataziMonoidziOrdziArgmax_Max_closure_tbl and 
_postazm0zi2zi0_DataziMonoidziOrdziArgmax_Min_closure_tbl in 
dist/build/Data/Monoid/Ord/Argmax.o


But cabal doesn't quit with an error code or anything. Doing `ghc --make 
Data/Monoid/Ord/Argmax.hs` works just fine without warnings. Anyone know 
what could cause them, or how to fix it?


--
Live well,
~wren
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] cabal, haddock, hscolour

2010-08-13 Thread Johannes Waldmann
How is the "cabal" magic that would run hscolour?

I am using  "cabal haddock --executables  --hyperlink-source"
and this generates the API docs for all modules,
and all have source links, but the actual html-ized source
is only generated for the main module, and missing for all others.

Thanks - J.W.

cabal --version
cabal-install version 0.8.2
using version 1.8.0.6 of the Cabal library 

haddock --version
Haddock version 2.7.2, (c) Simon Marlow 2006
Ported to use the GHC API by David Waern 2006-2008

HsColour --version
HsColour 1.17

ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.3


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


[Haskell-cafe] Cabal-install prefix

2010-09-21 Thread N. Raghavendra
I am new to Haskell, and am trying to install a package (scan) using
cabal-install.  I want it to install all files under the directory
${HOME}/nonvc, like in ~/nonvc/share and ~/nonvc/bin.  So I specified

install-dirs user
  -- prefix: /home/raghu/nonvc

in ~/.cabal/config.  But when I do `cabal install scan', it still
installs the files in ~/.cabal/bin and ~/.cabal/share.  How do I make
cabal install these files in ~/nonvc?

Thanks and regards,
Raghavendra.

-- 
N. Raghavendra  | http://www.retrotexts.net/
Harish-Chandra Research Institute   | http://www.mri.ernet.in/
See message headers for contact and OpenPGP information.

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


[Haskell-cafe] Cabal ^M bug

2006-11-18 Thread Vyacheslav Akhmechet

Cabal appears to have an end-of-line bug. If the .cabal file is
created on Windows and the project is installed on a Unix system, the
resulting executable ends up having ^M at the end because Cabal
doesn't properly handle Windows line termination. If the .cabal file
is converted to Unix style, everything installs as expected.

I tried to submit a ticket to Cabal via the wiki but couldn't
authenticate (guest/haskell, as says on the web page, doesn't seem to
work). Also HackageDB link seems to be down. I'm not sure who's
maintaining the project, so I'm emaling here.

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


[Haskell-cafe] Cabal licence files

2006-12-14 Thread Dougal Stanton
The cabal setup recognises a small set of licences which I don't think 
are well explained. I'm trying to put together a canonical list for 
setting up new projects.


GPL: 
LGPL: 
Thankfully the FSF are particularly anal^W well-organised about this 
kind of thing and they make it very easy to determine what each licence 
is and how to apply it


BSD3/BSD4:
There appears to be one explicitly-named BSD licence on the OSI site. 
There is also a closely related MIT licence. I don't know which would be 
which, if these are the two referred to in the licence data type.





PublicDomain:
The Creative Commons people have a public domain licence, though I am 
uncertain whether it is intended for code. Maybe this doesn't matter 
when what you're saying is "I give up all rights"?




AllRightsReserved:
This is the very opposite of a PD licence and, I believe, the default 
licence when there is no other explicitly stated. However it would be 
nice to say as much rather than relying on people's legal knowledge. ;)


OtherLicense:
This one's easy enough...

If anyone can fill in gaps and correct the errors in the above I think 
it would be useful. Obviously if this has been discussed elsewhere just 
point me off in the right direction! :)


Cheers,

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


[Haskell-cafe] cabal on ubuntu

2008-08-14 Thread Martin DeMello
I'm running Ubuntu 8 (Hardy Heron), and while trying to install cabal
ran into this bug:

https://bugs.launchpad.net/ubuntu/+source/haskell-cabal/+bug/231099

I finally had to install cabal manually, but it took me a lot of
googling to be sure that was the right thing to do. Could someone who
knows more than me put a howto in the ubuntu wiki
https://wiki.ubuntu.com/MOTU/Teams/UncommonProgrammingLanguages/Haskell
and/or the haskell one
http://www.haskell.org/haskellwiki/GNU/Linux#Ubuntu ?

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


[Haskell-cafe] cabal update : getHostByName

2008-09-01 Thread minh thu
Hi,

I've followed the instruction from the upcoming book Real World
Haskell to install cabal.

Now, when I enter "cabal update", it answers this:

Downloading package list from server
'http://hackage.haskell.org/packages/archive'
cabal: getHostByName: does not exist (no such host entry)

What's the problem ?

Thanks a lot,
Thu
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal upgrade

2008-09-26 Thread Brandon S. Allbery KF8NH

On 2008 Sep 26, at 4:49, Achim Schneider wrote:
Well, I might be spoiled by portage but shouldn't there be a thing  
like


cabal upgrade pureMD5

and

cabal upgrade --all



snuffy:502 Z$ cabal help upgrade
Usage: cabal upgrade [FLAGS]
   or: cabal upgrade [PACKAGES]

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon universityKF8NH


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


Re: [Haskell-cafe] cabal upgrade

2008-09-26 Thread Duncan Coutts
On Fri, 2008-09-26 at 10:49 +0200, Achim Schneider wrote:
> % cabal update
> Downloading package list from server
> 'http://hackage.haskell.org/packages/archive'
> 
> % cabal install pureMD5
> All requested packages already installed. Nothing to do.
> 
> % cabal install pureMD5-0.2.4
> Downloading 'pureMD5-0.2.4'...
> [...]

The latest released cabal-install does what you want here.

$ cabal install cabal-install

> Well, I might be spoiled by portage but shouldn't there be a thing like
> 
> cabal upgrade pureMD5

That also works in the latest version.

comparing,

$ cabal install foo
$ cabal upgrade foo

both mean to get the latest 'foo'.

The difference between install and upgrade is whether the dependencies
are also upgraded or not. In Gentoo they call this 'deep' upgrades.

> and
> 
> cabal upgrade --all

We write that as just

$ cabal upgrade


Duncan

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


Re: [Haskell-cafe] cabal upgrade

2008-09-30 Thread Cetin Sert
A reminder:

When I wanted to upgrade to yi 0.4.6.2, I needed to download the new package
list

cabal update   #download list of new packages
cabal upgrade #make any upgrades

Regards,
CS

2008/9/26 Duncan Coutts <[EMAIL PROTECTED]>

> On Fri, 2008-09-26 at 10:49 +0200, Achim Schneider wrote:
> > % cabal update
> > Downloading package list from server
> > 'http://hackage.haskell.org/packages/archive'
> >
> > % cabal install pureMD5
> > All requested packages already installed. Nothing to do.
> >
> > % cabal install pureMD5-0.2.4
> > Downloading 'pureMD5-0.2.4'...
> > [...]
>
> The latest released cabal-install does what you want here.
>
> $ cabal install cabal-install
>
> > Well, I might be spoiled by portage but shouldn't there be a thing like
> >
> > cabal upgrade pureMD5
>
> That also works in the latest version.
>
> comparing,
>
> $ cabal install foo
> $ cabal upgrade foo
>
> both mean to get the latest 'foo'.
>
> The difference between install and upgrade is whether the dependencies
> are also upgraded or not. In Gentoo they call this 'deep' upgrades.
>
> > and
> >
> > cabal upgrade --all
>
> We write that as just
>
> $ cabal upgrade
>
>
> Duncan
>
> ___
> 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 upgrade

2008-09-30 Thread Duncan Coutts
On Wed, 2008-10-01 at 01:59 +0200, Cetin Sert wrote:
> A reminder:
> 
> When I wanted to upgrade to yi 0.4.6.2, I needed to download the new
> package list
> 
> cabal update   #download list of new packages
> cabal upgrade #make any upgrades

Note that 'cabal upgrade' upgrades everything you've currently got
installed (which in general is not necessarily possible).

The standard workflow is just:

cabal update#download list of new packages
cabal install yi#install latest version of yi

The difference between
$ cabal install yi
and
$ cabal upgrade yi
is whether we try to upgrade the dependencies of yi as well or just try
to use any currently installed versions of yi's dependencies.

If anyone has some good ideas on how we can make the first step more
automatic then see ticket #359

http://hackage.haskell.org/trac/hackage/ticket/359


Duncan

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


Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Malcolm Wallace

When I wanted to upgrade to yi 0.4.6.2, I needed to download the new
package list

cabal update   #download list of new packages
cabal upgrade #make any upgrades


I never knew there was a 'cabal update' command, and it worries me.   
In my unhappy experience of packaging systems (apt/Aptitude, fink/ 
FinkCommander, and DarwinPorts/MacPorts) it was never obvious when it  
should be necessary to run the update.  Indeed, the advice given by  
each of these tools IIRC was to update every time you used it, before  
doing anything else.  (So why was it a manual task then?)  On the  
other hand, every one of those tools eventually failed for me on the  
update step, leaving me with an inconsistent and non-working  
configuration.


Regards,
Malcolm

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


Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Duncan Coutts
On Wed, 2008-10-01 at 08:58 +0100, Malcolm Wallace wrote:
> >> When I wanted to upgrade to yi 0.4.6.2, I needed to download the new
> >> package list
> >>
> >> cabal update   #download list of new packages
> >> cabal upgrade #make any upgrades
> 
> I never knew there was a 'cabal update' command, and it worries me.   
> In my unhappy experience of packaging systems (apt/Aptitude, fink/ 
> FinkCommander, and DarwinPorts/MacPorts) it was never obvious when it  
> should be necessary to run the update.  Indeed, the advice given by  
> each of these tools IIRC was to update every time you used it, before  
> doing anything else.  (So why was it a manual task then?)

Because we actually consult the index of available packages more often
than you think. Every time you cabal install in a local directory we
make sure all the required packages are available and consistent. If we
had to go to the network every time you would not be happy.

There should be a solution here that lets us update more automatically
while still allowing people to do offline operations. I'm not sure what
that solution is yet though.

> On the other hand, every one of those tools eventually failed for me on the  
> update step, leaving me with an inconsistent and non-working  
> configuration.

You will be glad to know that cabal's update is atomic (as of
cabal-install-0.5.2). It downloads the new index and atomically replaces
the old. So if the download is corrupted it should fail to gunzip and we
would not overwrite the old index.

Duncan

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


Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Svein Ove Aas
On Wed, Oct 1, 2008 at 7:54 PM, Duncan Coutts
> Because we actually consult the index of available packages more often
> than you think. Every time you cabal install in a local directory we
> make sure all the required packages are available and consistent. If we
> had to go to the network every time you would not be happy.
>
> There should be a solution here that lets us update more automatically
> while still allowing people to do offline operations. I'm not sure what
> that solution is yet though.
>
The solution seems obvious to me, actually:

Check the timestamp of the package file at every access. If it's older
than some configurable value, and you have network access, start
updating it.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Martin DeMello
On Tue, Sep 30, 2008 at 9:01 PM, Duncan Coutts
<[EMAIL PROTECTED]> wrote:
> On Wed, 2008-10-01 at 01:59 +0200, Cetin Sert wrote:
>> A reminder:
>>
>> When I wanted to upgrade to yi 0.4.6.2, I needed to download the new
>> package list
>>
>> cabal update   #download list of new packages
>> cabal upgrade #make any upgrades
>
> Note that 'cabal upgrade' upgrades everything you've currently got
> installed (which in general is not necessarily possible).
>
> The standard workflow is just:
>
> cabal update#download list of new packages
> cabal install yi#install latest version of yi

$ cabal install yi
Resolving dependencies...
'yi-0.4.6.2' is cached.
Configuring yi-0.4.6.2...
cabal: alex version >=2.0.1 && <3 is required but it could not be found.
cabal: Error: some packages failed to install:
yi-0.4.6.2 failed during the configure step. The exception was:
exit: ExitFailure 1

$ cabal install yi-gtk
Resolving dependencies...
cabal: cannot configure yi-gtk-0.2.1. It requires sourceview >=0.9.11
There is no available version of sourceview that satisfies >=0.9.11

Trying cabal upgrade didn't fix it - it still throws the same error.

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


Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Svein Ove Aas
On Wed, Oct 1, 2008 at 9:52 PM, Martin DeMello <[EMAIL PROTECTED]> wrote:
>
> $ cabal install yi
> Resolving dependencies...
> 'yi-0.4.6.2' is cached.
> Configuring yi-0.4.6.2...
> cabal: alex version >=2.0.1 && <3 is required but it could not be found.
> cabal: Error: some packages failed to install:
> yi-0.4.6.2 failed during the configure step. The exception was:
> exit: ExitFailure 1
>
> $ cabal install yi-gtk
> Resolving dependencies...
> cabal: cannot configure yi-gtk-0.2.1. It requires sourceview >=0.9.11
> There is no available version of sourceview that satisfies >=0.9.11
>
> Trying cabal upgrade didn't fix it - it still throws the same error.
>
This is because the sourceview package is not on hackage - it's
legacy, non-cabal code and can be found on
http://www.haskell.org/gtk2hs/

You'll have to install it manually, I'm afraid.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Martin DeMello
On Wed, Oct 1, 2008 at 1:04 PM, Svein Ove Aas <[EMAIL PROTECTED]> wrote:
> On Wed, Oct 1, 2008 at 9:52 PM, Martin DeMello <[EMAIL PROTECTED]> wrote:
>>
>> $ cabal install yi
>> Resolving dependencies...
>> 'yi-0.4.6.2' is cached.
>> Configuring yi-0.4.6.2...
>> cabal: alex version >=2.0.1 && <3 is required but it could not be found.
>> cabal: Error: some packages failed to install:
>> yi-0.4.6.2 failed during the configure step. The exception was:
>> exit: ExitFailure 1
>>
>> $ cabal install yi-gtk
>> Resolving dependencies...
>> cabal: cannot configure yi-gtk-0.2.1. It requires sourceview >=0.9.11
>> There is no available version of sourceview that satisfies >=0.9.11
>>
>> Trying cabal upgrade didn't fix it - it still throws the same error.
>>
> This is because the sourceview package is not on hackage - it's
> legacy, non-cabal code and can be found on
> http://www.haskell.org/gtk2hs/
>
> You'll have to install it manually, I'm afraid.

It's not just yi-gtk, though - yi itself isn't installing via cabal,
due to the alex version >=2.0.1 && <3 dependency.

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


Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Gwern Branwen
On 2008.10.01 12:52:47 -0700, Martin DeMello <[EMAIL PROTECTED]> scribbled 1.2K 
characters:
> On Tue, Sep 30, 2008 at 9:01 PM, Duncan Coutts
> <[EMAIL PROTECTED]> wrote:
> > On Wed, 2008-10-01 at 01:59 +0200, Cetin Sert wrote:
> >> A reminder:
> >>
> >> When I wanted to upgrade to yi 0.4.6.2, I needed to download the new
> >> package list
> >>
> >> cabal update   #download list of new packages
> >> cabal upgrade #make any upgrades
> >
> > Note that 'cabal upgrade' upgrades everything you've currently got
> > installed (which in general is not necessarily possible).
> >
> > The standard workflow is just:
> >
> > cabal update#download list of new packages
> > cabal install yi#install latest version of yi
>
> $ cabal install yi
> Resolving dependencies...
> 'yi-0.4.6.2' is cached.
> Configuring yi-0.4.6.2...
> cabal: alex version >=2.0.1 && <3 is required but it could not be found.
> cabal: Error: some packages failed to install:
> yi-0.4.6.2 failed during the configure step. The exception was:
> exit: ExitFailure 1
>
> $ cabal install yi-gtk
> Resolving dependencies...
> cabal: cannot configure yi-gtk-0.2.1. It requires sourceview >=0.9.11
> There is no available version of sourceview that satisfies >=0.9.11
>
> Trying cabal upgrade didn't fix it - it still throws the same error.
>
> martin

Yi fails on Alex because Cabal doesn't track executables, nor executables 
needed for installation. You want 'cabal install alex yi'; I believe the FAQ 
covers this.

As for cabal install yi-gtk, unless things have changed since I last looked, 
the answer is Don't Do That. yi-gtk and yi-vty are solely for yi 0.3 and below 
- it's obsolete, in other words. Yi depends directly on vty (which cabal 
install will handle) and GTK2HS, which unfortunately is not on Hackage and so 
you or your distro has to handle that.

--
gwern
beef Croatian Waco, Mace H


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 upgrade

2008-10-01 Thread Martin DeMello
On Wed, Oct 1, 2008 at 1:06 PM, Gwern Branwen <[EMAIL PROTECTED]> wrote:

> Yi fails on Alex because Cabal doesn't track executables, nor executables 
> needed for installation. You want 'cabal install alex yi';

Yay, that finally worked :) Had to add ~/.cabal/bin to my path first,
which wasn't hard to figure out but should probably also be in a faq
somewhere.

> I believe the FAQ covers this.

Nope. I was following http://www.haskell.org/haskellwiki/Yi when I got
stuck, and the page makes no mention of how to resolve the alex
dependency

> As for cabal install yi-gtk, unless things have changed since I last looked, 
> the answer is Don't Do That. yi-gtk and yi-vty are solely for yi 0.3 and 
> below - it's obsolete, in other words. Yi depends directly on vty (which 
> cabal install will handle) and GTK2HS, which unfortunately is not on Hackage 
> and so you or your distro has to handle that.

Okay, thanks :)

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


Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Gwern Branwen
On 2008.10.01 13:24:55 -0700, Martin DeMello <[EMAIL PROTECTED]> scribbled 0.9K 
characters:
> On Wed, Oct 1, 2008 at 1:06 PM, Gwern Branwen <[EMAIL PROTECTED]> wrote:
>
> > Yi fails on Alex because Cabal doesn't track executables, nor executables 
> > needed for installation. You want 'cabal install alex yi';
>
> Yay, that finally worked :) Had to add ~/.cabal/bin to my path first,
> which wasn't hard to figure out but should probably also be in a faq
> somewhere.

The exact issue of where to install executables is somewhat tricky; adding 
~/.cabal/bin is one option, but you could've used --prefix=/home/martin/ or you 
could've used the symlink option in ~/.cabal/config or... There's not really a 
Cabal-install FAQ for that because there's no clear answer.

> > I believe the FAQ covers this.
>
> Nope. I was following http://www.haskell.org/haskellwiki/Yi when I got
> stuck, and the page makes no mention of how to resolve the alex
> dependency
>
> > As for cabal install yi-gtk, unless things have changed since I last 
> > looked, the answer is Don't Do That. yi-gtk and yi-vty are solely for yi 
> > 0.3 and below - it's obsolete, in other words. Yi depends directly on vty 
> > (which cabal install will handle) and GTK2HS, which unfortunately is not on 
> > Hackage and so you or your distro has to handle that.
>
> Okay, thanks :)
>
> martin

I've added those 2 questions to the installation section. They've come up so 
often I was sure they were already there.

--
gwern
monarchist DCJFTF EADA SASSTIXS Kamumaruha Waihopai phones Colonel IA wideband


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 upgrade

2008-10-01 Thread Duncan Coutts
On Wed, 2008-10-01 at 20:53 +0200, Svein Ove Aas wrote:
> On Wed, Oct 1, 2008 at 7:54 PM, Duncan Coutts
> > Because we actually consult the index of available packages more often
> > than you think. Every time you cabal install in a local directory we
> > make sure all the required packages are available and consistent. If we
> > had to go to the network every time you would not be happy.
> >
> > There should be a solution here that lets us update more automatically
> > while still allowing people to do offline operations. I'm not sure what
> > that solution is yet though.
> >
> The solution seems obvious to me, actually:
> 
> Check the timestamp of the package file at every access. If it's older
> than some configurable value,

Yes, that's the interim solution we're suggesting in the ticket, though
warning rather than actually blocking and going to the network.

> and you have network access, start updating it.

That's hard. Detecting if we would be able to make a network connection
without actually doing it is not something I know how to do (esp in a
portable way). We would very much appreciate some help in this area.

Duncan

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


Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread wman
On Wed, Oct 1, 2008 at 10:52 PM, Duncan Coutts
<[EMAIL PROTECTED]>wrote:

> > and you have network access, start updating it.
>
> That's hard. Detecting if we would be able to make a network connection
> without actually doing it is not something I know how to do (esp in a
> portable way). We would very much appreciate some help in this area.
>
> Duncan
>

Well, i wouldn't try to detect it. If someone has some auto-update interval
specified, it would be sensible enough to try the update automatically imho.

Or, if the package server would responds to ICMP echo requests (seems like
it doesn't), this seems as a cheap-enough way to test whether it should try
to update.

Or how about http/1.1 if-modified-since header field ?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Svein Ove Aas
On Wed, Oct 1, 2008 at 10:52 PM, Duncan Coutts
<[EMAIL PROTECTED]> wrote:
> On Wed, 2008-10-01 at 20:53 +0200, Svein Ove Aas wrote:

>> and you have network access, start updating it.
>
> That's hard. Detecting if we would be able to make a network connection
> without actually doing it is not something I know how to do (esp in a
> portable way). We would very much appreciate some help in this area.
>
OS X has a function to test that, and a way to get notified when the
access state changes; it never occurred to me that other OSs might
not. It only tests for local connectivity, though.

That aside, why not start downloading in the background, while it's
doing whatever you started cabal for? Assuming the network is working,
you should have an updated package list by the time it's done;
granted, it won't be used for *that* invocation, but next time you
invoke cabal it will. If the download fails, just ignore it.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Krzysztof Skrzętnicki
On Thu, Oct 2, 2008 at 00:00, Svein Ove Aas <[EMAIL PROTECTED]> wrote:
> That aside, why not start downloading in the background, while it's
> doing whatever you started cabal for? Assuming the network is working,
> you should have an updated package list by the time it's done;
> granted, it won't be used for *that* invocation, but next time you
> invoke cabal it will. If the download fails, just ignore it.

Personally I don't like the idea: If we know that there is newer
package list, why not use it? It feels somewhat unintuitive to me.

All best

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


[Haskell-cafe] cabal-install question

2008-10-21 Thread Ken98

Hello, I recently started using cabal-install to install packages. However,
ran into a problem today trying to install ftphs where the current HUnit
dependency required base (==4). I'm using ghc-6.8.2 on ubuntu. 

To get around this, I looked through previous versions of HUnit and found
that 1.2.0.0 was the last to have a successful build with ghc-6.8. So, I
downloaded the tar.gz and did a runhaskell Setup.hs ... This worked and I
was able to complete the ftphs install. 

So my question is, could I have used cabal install to specify the specific
version of HUnit without having to do the manual
download/configure/build/install? 

Thanks,
Ken
-- 
View this message in context: 
http://www.nabble.com/cabal-install-question-tp20098091p20098091.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

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


Re: [Haskell-cafe] Cabal warning

2008-10-21 Thread Duncan Coutts
On Wed, 2008-10-22 at 00:05 +0200, Henk-Jan van Tuyl wrote:
> L.S.,
> 
> I keep getting the following warning for each "cabal install" command:
> Warning: Error parsing config file C:\Documents and
> Settings\[User]\Application Data\cabal\config: On line 1: GHC
> Warning: Using default configuration.
> 
> The first line of this file is:
> compiler: GHC
> 
> What can I do about this?

Can you save a copy of the file and attach it to a new ticket at:
http://hackage.haskell.org/trac/hackage/

I'll look into why it's not parsing the old format correctly.

Once you've done that, you can delete the file and let it re-create a
default one.

Duncan

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


Re: [Haskell-cafe] Cabal warning

2008-10-21 Thread Peter Higley
I had the same problem on a Mac system, change "GHC" to "ghc" and things
will work.

I didn't even think that it was an actual bug!  Ticket #379 reports the
problem.

On Tue, Oct 21, 2008 at 3:52 PM, Duncan Coutts
<[EMAIL PROTECTED]>wrote:

> On Wed, 2008-10-22 at 00:05 +0200, Henk-Jan van Tuyl wrote:
> > L.S.,
> >
> > I keep getting the following warning for each "cabal install" command:
> > Warning: Error parsing config file C:\Documents and
> > Settings\[User]\Application Data\cabal\config: On line 1: GHC
> > Warning: Using default configuration.
> >
> > The first line of this file is:
> > compiler: GHC
> >
> > What can I do about this?
>
> Can you save a copy of the file and attach it to a new ticket at:
> http://hackage.haskell.org/trac/hackage/
>
> I'll look into why it's not parsing the old format correctly.
>
> Once you've done that, you can delete the file and let it re-create a
> default one.
>
> Duncan
>
> ___
> 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 warning

2008-10-22 Thread Duncan Coutts
On Tue, 2008-10-21 at 23:36 -0700, Peter Higley wrote:
> I had the same problem on a Mac system, change "GHC" to "ghc" and
> things will work.
> 
> I didn't even think that it was an actual bug!  Ticket #379 reports
> the problem.

Thanks for reporting that.

Duncan

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


[Haskell-cafe] Cabal and GHCi

2008-10-26 Thread Reiner Pope
Hi,

Is there a way to use GHCi with code which is cabal-buildable but not "ghc
--make"-able?  The emacs haskell-mode makes a pretty good guess by :cd-ing
into the directory with the .cabal file; however, if there is a different
source-dir this doesn't work so well. A number of more advanced cabal
features are even harder to handle.

Cheers,

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


[Haskell-cafe] Cabal (was: Compilers)

2008-11-29 Thread Matthias Kilian
On Fri, Nov 28, 2008 at 08:51:45PM -0800, Jason Dagit wrote:
>  Personally, I look at it this way.  Both build systems have different
> advantages that the other cannot provide but they are not mutually
> exclusive.

I don't see any advantage in Cabal, except that a .cabal file
provides some metadata and dependency information that can help the
build.

> Also, the effort to keep them both working for the respective
> groups of users is rather small in practice.

At least in ghc, the mixture of make and Cabal was a huge failure.

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


[Haskell-cafe] Cabal and Hat?

2008-12-03 Thread Magnus Therning
Is it possible to use cabal to build the files that hat would need to
do tracing (i.e. .htx files)?

/M

-- 
Magnus Therning(OpenPGP: 0xAB4DFBA4)
magnus@therning.org  Jabber: magnus@therning.org
http://therning.org/magnus identi.ca|twitter: magthe
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal/primes

2009-06-02 Thread Bertram Felgenhauer
michael rice wrote:
> Finally got adventurous enough to get Cabal working, downloaded the
> primes package, and got the following error message when trying 
> isPrime. Am I missing something here?

The Data.Numbers.Primes module of the primes package does not implement
'isPrime'. The Numbers package is probably the one you want.

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


Re: [Haskell-cafe] Cabal/primes

2009-06-03 Thread michael rice
OK, I downloaded Numbers. Still missing the three functions I wanted, which are 
primes, isPrime, and isProbablyPrime. How do I get these?

Michael



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


Re: [Haskell-cafe] Cabal/primes

2009-06-03 Thread brian

Prelude> :m + Data.Numbers.Primes
Prelude Data.Numbers.Primes> :browse
isPrime :: Integer -> Bool
isProbablyPrime ::
  (System.Random.RandomGen g) => Integer -> g -> (Bool, g)
primes :: [Integer]
Prelude Data.Numbers.Primes> isPrime 3525266
Loading package syb ... linking ... done.
Loading package base-3.0.3.0 ... linking ... done.
Loading package old-locale-1.0.0.1 ... linking ... done.
Loading package old-time-1.0.0.1 ... linking ... done.
Loading package random-1.0.0.1 ... linking ... done.
Loading package Numbers-0.2.1 ... linking ... done.
False
Prelude Data.Numbers.Primes>

On Jun 3, 2009, at 6:57 AM, michael rice wrote:

OK, I downloaded Numbers. Still missing the three functions I  
wanted, which are primes, isPrime, and isProbablyPrime. How do I get  
these?


Michael

___
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/primes

2009-06-03 Thread michael rice
This is working differently than it did last night, when at least import was 
working.

Michael

[mich...@localhost ~]$ ghci
GHCi, version 6.10.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude> import Data.Numbers.Primes
Could not find module `Data.Numbers.Primes':
  it was found in multiple packages: Numbers-0.2.1 primes-0.1.1
Prelude> :m + Data.Numbers.Primes
Could not find module `Data.Numbers.Primes':
  it was found in multiple packages: Numbers-0.2.1 primes-0.1.1
Prelude> Data.Numbers.Primes> :browse

:1:21: parse error on input `:'
Prelude> isPrime 3525266

:1:0: Not in scope: `isPrime'
Prelude> 

==
[mich...@localhost ~]$ cd .cabal
[mich...@localhost .cabal]$ ls -l
total 20
-rw-rw-r-- 1 michael michael 1729 2009-06-02 18:59 config
drwxrwxr-x 4 michael michael 4096 2009-06-02 22:14 lib
drwxrwxr-x 2 michael michael 4096 2009-06-02 19:05 logs
drwxrwxr-x 3 michael michael 4096 2009-06-02 18:59 packages
drwxrwxr-x 3 michael michael 4096 2009-06-02 19:05 share
[mich...@localhost .cabal]$ cd packages
[mich...@localhost packages]$ ls -l
total 4
drwxrwxr-x 4 michael michael 4096 2009-06-02 22:14 hackage.haskell.org
[mich...@localhost packages]$ cd hackage.haskell.org
[mich...@localhost hackage.haskell.org]$ ls -l
total 12464
-rw--- 1 michael michael 11735040 2009-06-02 22:14 00-index.tar
-rw--- 1 michael michael   992994 2009-06-02 22:14 00-index.tar.gz
-rw-rw-r-- 1 michael michael  418 2009-06-02 22:14 build-reports.log
drwxrwxr-x 3 michael michael 4096 2009-06-02 22:14 Numbers
drwxrwxr-x 3 michael michael 4096 2009-06-02 19:05 primes
[mich...@localhost hackage.haskell.org]$ 
[mich...@localhost hackage.haskell.org]$ pwd
/home/michael/.cabal/packages/hackage.haskell.org
[mich...@localhost hackage.haskell.org]$ 


=



--- On Wed, 6/3/09, brian  wrote:

From: brian 
Subject: Re: [Haskell-cafe] Cabal/primes
To: "michael rice" 
Cc: haskell-cafe@haskell.org
Date: Wednesday, June 3, 2009, 10:46 AM

Prelude> :m + Data.Numbers.Primes
Prelude Data.Numbers.Primes> :browse
isPrime :: Integer -> Bool
isProbablyPrime ::
  (System.Random.RandomGen g) => Integer -> g -> (Bool, g)
primes :: [Integer]
Prelude Data.Numbers.Primes> isPrime 3525266
Loading package syb ... linking ... done.
Loading package base-3.0.3.0 ... linking ... done.
Loading package old-locale-1.0.0.1 ... linking ... done.
Loading package old-time-1.0.0.1 ... linking ... done.
Loading package random-1.0.0.1 ... linking ... done.
Loading package Numbers-0.2.1 ... linking ... done.
False
Prelude Data.Numbers.Primes>

On Jun 3, 2009, at 6:57 AM, michael rice wrote:

> OK, I downloaded Numbers. Still missing the three functions I wanted, which 
> are primes, isPrime, and isProbablyPrime. How do I get these?
> 
> Michael
> 
> ___
> 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/primes

2009-06-03 Thread michael rice
Got it working.

I downloaded two packages, primes and Numbers. Since Numbers has the three 
functions I want to use, primes, isPrime and isProbablyPrime, how do I 
uninstall the primes package so there won't be a conflict?

Michael

=

[mich...@localhost hackage.haskell.org]$ ghc-pkg hide primes
Writing new package config file... done.
[mich...@localhost hackage.haskell.org]$ isPrime 7
bash: isPrime: command not found
[mich...@localhost hackage.haskell.org]$ ghci
GHCi, version 6.10.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude> :m + Data.Numbers.Primes
Prelude Data.Numbers.Primes> isPrime 7
Loading package syb ... linking ... done.
Loading package base-3.0.3.0 ... linking ... done.
Loading package old-locale-1.0.0.1 ... linking ... done.
Loading package old-time-1.0.0.1 ... linking ... done.
Loading package random-1.0.0.1 ... linking ... done.
Loading package Numbers-0.2.1 ... linking ... done.
True
Prelude Data.Numbers.Primes> take 10 primes
[2,3,5,7,11,13,17,19,23,29]
 Prelude Data.Numbers.Primes>


--- On Wed, 6/3/09, michael rice  wrote:

From: michael rice 
Subject: Re: [Haskell-cafe] Cabal/primes
To: "brian" 
Cc: haskell-cafe@haskell.org
Date: Wednesday, June 3, 2009, 3:46 PM

This is working differently than it did last night, when at least import was 
working.

Michael

[mich...@localhost ~]$ ghci
GHCi, version 6.10.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude> import Data.Numbers.Primes
Could not find module `Data.Numbers.Primes':
  it was found in multiple packages: Numbers-0.2.1 primes-0.1.1
Prelude> :m + Data.Numbers.Primes
Could not find module `Data.Numbers.Primes':
  it was found in multiple packages: Numbers-0.2.1 primes-0.1.1
Prelude> Data.Numbers.Primes> :browse

:1:21: parse error on input `:'
Prelude> isPrime 3525266

:1:0: Not in scope:
 `isPrime'
Prelude> 

==
[mich...@localhost ~]$ cd .cabal
[mich...@localhost .cabal]$ ls -l
total 20
-rw-rw-r-- 1 michael michael 1729 2009-06-02 18:59 config
drwxrwxr-x 4 michael michael 4096 2009-06-02 22:14 lib
drwxrwxr-x 2 michael michael 4096 2009-06-02 19:05 logs
drwxrwxr-x 3 michael michael 4096 2009-06-02 18:59 packages
drwxrwxr-x 3 michael michael 4096 2009-06-02 19:05 share
[mich...@localhost .cabal]$ cd packages
[mich...@localhost packages]$ ls -l
total 4
drwxrwxr-x 4 michael michael 4096 2009-06-02 22:14 hackage.haskell.org
[mich...@localhost packages]$ cd hackage.haskell.org
[mich...@localhost hackage.haskell.org]$ ls -l
total 12464
-rw--- 1 michael michael 11735040 2009-06-02 22:14 00-index.tar
-rw--- 1 michael michael   992994 2009-06-02 22:14 00-index.tar.gz
-rw-rw-r-- 1 michael michael  418 2009-06-02 22:14
 build-reports.log
drwxrwxr-x 3 michael michael 4096 2009-06-02 22:14 Numbers
drwxrwxr-x 3 michael michael 4096 2009-06-02 19:05 primes
[mich...@localhost hackage.haskell.org]$ 
[mich...@localhost hackage.haskell.org]$ pwd
/home/michael/.cabal/packages/hackage.haskell.org
[mich...@localhost hackage.haskell.org]$ 


=



--- On Wed, 6/3/09, brian  wrote:

From: brian 
Subject: Re: [Haskell-cafe] Cabal/primes
To: "michael rice" 
Cc: haskell-cafe@haskell.org
Date: Wednesday, June 3, 2009, 10:46 AM

Prelude> :m + Data.Numbers.Primes
Prelude Data.Numbers.Primes> :browse
isPrime :: Integer -> Bool
isProbablyPrime
 ::
  (System.Random.RandomGen g) => Integer -> g -> (Bool, g)
primes :: [Integer]
Prelude Data.Numbers.Primes> isPrime 3525266
Loading package syb ... linking ... done.
Loading package base-3.0.3.0 ... linking ... done.
Loading package old-locale-1.0.0.1 ... linking ... done.
Loading package old-time-1.0.0.1 ... linking ... done.
Loading package random-1.0.0.1 ... linking ... done.
Loading package Numbers-0.2.1 ... linking ... done.
False
Prelude Data.Numbers.Primes>

On Jun 3, 2009, at 6:57 AM, michael rice wrote:

> OK, I downloaded Numbers. Still missing the three functions I wanted, which 
> are primes, isPrime, and isProbablyPrime. How do I get these?
> 
> Michael
> 
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe




  
-Inline Attachment Follows-

___
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/primes

2009-06-03 Thread Don Stewart
nowgate:
> Got it working.
> 
> I downloaded two packages, primes and Numbers. Since Numbers has the three
> functions I want to use, primes, isPrime and isProbablyPrime, how do I
> uninstall the primes package so there won't be a conflict?


Easy!

$ ghc-pkg unregister primes

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


Re: [Haskell-cafe] Cabal/primes

2009-06-03 Thread michael rice
Excellent!

Thanks.

Michael

--- On Wed, 6/3/09, Don Stewart  wrote:

From: Don Stewart 
Subject: Re: [Haskell-cafe] Cabal/primes
To: "michael rice" 
Cc: "brian" , haskell-cafe@haskell.org
Date: Wednesday, June 3, 2009, 6:40 PM

nowgate:
> Got it working.
> 
> I downloaded two packages, primes and Numbers. Since Numbers has the three
> functions I want to use, primes, isPrime and isProbablyPrime, how do I
> uninstall the primes package so there won't be a conflict?


Easy!

    $ ghc-pkg unregister primes

-- Don



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


Re: [Haskell-cafe] Cabal/primes

2009-06-04 Thread Ryan Ingram
On this note, shouldn't there be "cabal uninstall"?

  -- ryan

On Wed, Jun 3, 2009 at 3:40 PM, Don Stewart  wrote:
> nowgate:
>> Got it working.
>>
>> I downloaded two packages, primes and Numbers. Since Numbers has the three
>> functions I want to use, primes, isPrime and isProbablyPrime, how do I
>> uninstall the primes package so there won't be a conflict?
>
>
> Easy!
>
>    $ ghc-pkg unregister primes
>
> -- Don
> ___
> 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/primes

2009-06-04 Thread Thomas DuBuisson
On Thu, Jun 4, 2009 at 9:52 AM, Ryan Ingram  wrote:
> On this note, shouldn't there be "cabal uninstall"?

You mean ticket 234?

http://hackage.haskell.org/trac/hackage/ticket/234

Yes, its been open for a year and has been quietly waiting for
developer time... are you the lucky developer who gets to implement
it?

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


[Haskell-cafe] Cabal "addressibility" problem

2009-06-05 Thread Vasili I. Galchin
Hello,

  The following is a fragment in my cabal file:


Executable GraphPartitionTest
   Main-Is:Swish.HaskellRDF.GraphPartitionTest.hs
   Other-modules:  Swish.HaskellRDF.GraphPartition
   Swish.HaskellRDF.GraphClass
   Swish.HaskellUtils.ListHelpers
   Swish.HaskellUtils.TestHelpers



When I try to do a build I get:


Setup: can't find source for Swish in .

Cabal/Setup seem to be looking in the current directory for source but as
you can see I gave "full" paths, i.e. Swish.HaskellRDF* or
Swish.HaskellUtils*.

What I doing wrong?


Regards,

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


[Haskell-cafe] cabal version issue

2009-07-18 Thread Vasili I. Galchin
Hello,

vigalc...@ubuntu:~/FTP/Haskell/06052009.Swish-0.2.1$ cabal --version
cabal-install version 0.5.1
using version 1.4.0.1 of the Cabal library

vigalc...@ubuntu:~/FTP/Haskell/Swish-0.2.1$ cabal configure --user
--prefix=$HOME
Warning: swish.cabal: A package using section syntax should require
"Cabal-Version: >= 1.2" or equivalent.
Warning: swish.cabal: A package using section syntax should require
"Cabal-Version: >= 1.2" or equivalent.

What is the "Cabal-Version" in the latter? Why I am getting this warning?

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


[Haskell-cafe] Cabal packages -> cabbages

2009-09-20 Thread Jason Dusek
  Some day, we're going to need a short, catchy name for Cabal
  packages. Let's call them cabbages.

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


[Haskell-cafe] Cabal upload issue

2009-11-12 Thread Jeremy O'Donoghue
Hi all,

I'm in the process of trying update the revisions of wx (part of
wxHaskell) on hackage.

I'm getting an error I find slightly surprising:

"400 Error in upload
The dependency 'build-depends: base' does not specify an upper bound
on the version number. Each major release of the 'base' package
changes the API in various ways and most packages will need some
changes to compile with it. The recommended practise is to specify an
upper bound on the version of the 'base' package. This ensures your
package will continue to build when a new major version of the 'base'
package is released. If you are not sure what upper bound to use then
use the next  major version. For example if you have tested your
package with 'base' version 2 and 3 then use 'build-depends: base >= 2
&& < 4'."

In this case, we have the following in wx.cabal

Library
if flag(splitBase)
build-depends: base >= 3, wxcore >= 0.12.1.1, stm
else
build-depends: base <  3, wxcore >= 0.12.1.1, stm

Is this a bug, or am I doing something stupid?

I should point out that this builds perfectly on my machine.

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


[Haskell-cafe] cabal library dependencies

2007-10-08 Thread Nehir Sonmez

Hi All,

To test some programs written in CABAL, I need to use a server (where I 
do not have root access) with GHC 6.6.1 (in-place) installed. However, 
many programs need more libraries that have to be installed, (such as 
binary, or derive) for which, even when I use ./Setup configure 
--prefix=something,


1) After the ./Setup build, it can not do ./Setup install correctly 
because I am not root, ie.
Installing: /usr/local/lib/derive-0.1/ghc-6.6.1 & /usr/local/bin 
derive-0.1...
Setup: /usr/local/lib/derive-0.1: createDirectory: permission denied 
(Permission denied)


2) But the .o and the .a files are created. However possibly due to (1), 
I can not make the program see the library, so in the end when I try 
configuring the program, I get (for example):

Setup: cannot satisfy dependency derive-any

possible solutions I could think of were:
1) LD_LIBRARY_PATH
2) use configure with a --with flag
3) copying the library files to the prefix directory of the program I
ultimately want to run
4) The -L flag

and still no luck, so here I am asking for your help... Thanks a lot in 
advance,

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


Re: [Haskell-cafe] cabal problem?

2007-11-14 Thread Don Stewart
jens.blanck:
>I have problems building X11. I just installed ghc 6.8 but I got the same
>behaviour when asking it to use the old compiler.
> 
>Jens
> 
>> runghc Setup.hs configure
>Configuring X11-1.3.0.2007...
>checking for gcc... gcc
>checking for C compiler default output file name... a.out
>checking whether the C compiler works... yes
>checking whether we are cross compiling... no
>checking for suffix of executables...
>checking for suffix of object files... o
>checking whether we are using the GNU C compiler... yes
>checking whether gcc accepts -g... yes
>checking for gcc option to accept ANSI C... none needed
>checking how to run the C preprocessor... gcc -E
>checking for X... libraries /usr/X11R6/lib64, headers /usr/X11R6/include
>checking for gethostbyname... yes
>checking for connect... yes
>checking for remove... yes
>checking for shmat... yes
>checking for IceConnectionNumber in -lICE... yes
>checking whether to build Xinerama... yes
>checking for egrep... grep -E
>checking for ANSI C header files... yes
>checking for sys/types.h... yes
>checking for sys/stat.h... yes
>checking for stdlib.h... yes
>checking for string.h... yes
>checking for memory.h... yes
>checking for strings.h... yes
>checking for inttypes.h... yes
>checking for stdint.h... yes
>checking for unistd.h... yes
>checking X11/extensions/Xinerama.h usability... yes
>checking X11/extensions/Xinerama.h presence... yes
>checking for X11/extensions/Xinerama.h... yes
>configure: creating ./config.status
>config.status: creating [1]config.mk
>config.status: creating X11.buildinfo
>config.status: creating include/HsX11Config.h
>config.status: include/HsX11Config.h is unchanged
>config.status: creating include/X11_extras_config.h
>config.status: include/X11_extras_config.h is unchanged
>> runghc Setup.hs build
>Preprocessing library X11-1.3.0.2007...
>Building X11-1.3.0.2007...
>[ 1 of 17] Compiling Graphics.X11.Xlib.Types (
>dist/build/Graphics/X11/Xlib/Types.hs,
>dist/build/Graphics/X11/Xlib/Types.o )
>[ 2 of 17] Compiling Graphics.X11.Types (
>dist/build/Graphics/X11/Types.hs, dist/build/Graphics/X11/Types.o )
>[ 3 of 17] Compiling Graphics.X11.Xlib.Atom (
>dist/build/Graphics/X11/Xlib/Atom.hs, dist/build/Graphics/X11/Xlib/Atom.o
>)
>[ 4 of 17] Compiling Graphics.X11.Xlib.Color ( Graphics/X11/Xlib/Color.hs,
>dist/build/Graphics/X11/Xlib/Color.o )
>[ 5 of 17] Compiling Graphics.X11.Xlib.Context (
>Graphics/X11/Xlib/Context.hs, dist/build/Graphics/X11/Xlib/Context.o )
>[ 6 of 17] Compiling Graphics.X11.Xlib.Display (
>Graphics/X11/Xlib/Display.hs, dist/build/Graphics/X11/Xlib/Display.o )
>[ 7 of 17] Compiling Graphics.X11.Xlib.Event (
>dist/build/Graphics/X11/Xlib/Event.hs,
>dist/build/Graphics/X11/Xlib/Event.o )
>[ 8 of 17] Compiling Graphics.X11.Xlib.Font (
>dist/build/Graphics/X11/Xlib/Font.hs, dist/build/Graphics/X11/Xlib/Font.o
>)
>[ 9 of 17] Compiling Graphics.X11.Xlib.Misc (
>dist/build/Graphics/X11/Xlib/Misc.hs, dist/build/Graphics/X11/Xlib/Misc.o
>)
>[10 of 17] Compiling Graphics.X11.Xlib.Region (
>Graphics/X11/Xlib/Region.hs, dist/build/Graphics/X11/Xlib/Region.o )
>[11 of 17] Compiling Graphics.X11.Xlib.Screen (
>Graphics/X11/Xlib/Screen.hs, dist/build/Graphics/X11/Xlib/Screen.o )
>[12 of 17] Compiling Graphics.X11.Xlib.Window (
>Graphics/X11/Xlib/Window.hs, dist/build/Graphics/X11/Xlib/Window.o )
>[13 of 17] Compiling Graphics.X11.Xlib.Image ( Graphics/X11/Xlib/Image.hs,
>dist/build/Graphics/X11/Xlib/Image.o )
>[14 of 17] Compiling Graphics.X11.Xlib ( Graphics/X11/Xlib.hs,
>dist/build/Graphics/X11/Xlib.o )
>[15 of 17] Compiling Graphics.X11.Xlib.Extras (
>dist/build/Graphics/X11/Xlib/Extras.hs,
>dist/build/Graphics/X11/Xlib/Extras.o )
>Warning: orphan instances:
>  instance base:GHC.Read.Read
>[X11-1.3.0.2007:Graphics.X11.Xlib.Types.Rectangle]
>= $f1
> 
>[16 of 17] Compiling Graphics.X11.Xinerama (
>dist/build/Graphics/X11/Xinerama.hs, dist/build/Graphics/X11/Xinerama.o )
>[17 of 17] Compiling Graphics.X11 ( Graphics/X11.hs,
>dist/build/Graphics/X11.o )
>/usr/bin/ar: creating dist/build/libHSX11-1.3.0.2007.a
>> sudo runghc Setup.hs install
>root's password:
>Setup.hs : Warning: Unknown field 'build-type'
>Setup.hs: error reading ./.setup-config; run "setup configure" command?
> 


I'm not sure what's going on here: I just ran runhaskell Setup.hs
install myself and got the same error:

$ runhaskell Setup.hs install
Setup.hs: error reading dist/setup-config; run "setup configure" command?

Rerunning the configure/build/install process fixed it.

-- Don
___
Haskell-Cafe mailing 

Re: [Haskell-cafe] cabal problem?

2007-11-14 Thread Duncan Coutts
On Wed, 2007-11-14 at 16:16 +, Jens Blanck wrote:

> > sudo runghc Setup.hs install
> root's password:
> Setup.hs : Warning: Unknown field 'build-type'
> Setup.hs: error reading ./.setup-config; run "setup configure"
> command?

I suspect your path is different for your root user, so it's picking up
an old ghc and an old cabal version. You can tell it's an old version
(probably 1.1.x) because it doesn't know about the new build-type field.

You can work around it using:
ghc --make Setup.hs -o setup
sudo ./setup install

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


Re: [Haskell-cafe] cabal-install

2007-11-27 Thread Don Stewart
ben.franksen:
> Just thought I install the latest version (0.4.0) from hackage and test it.
> Build and install went fine, but then it gets strange:
> 
> [EMAIL PROTECTED]: .../haskell/cabal-install-0.4.0 > sudo runhaskell Setup.lhs
> install
> Installing: /usr/local/bin
> [EMAIL PROTECTED]: .../haskell/cabal-install-0.4.0 > rehash
> [EMAIL PROTECTED]: .../haskell/cabal-install-0.4.0 > cabal --help
> Usage: cabal [GLOBAL FLAGS]
>   or:  cabal COMMAND [FLAGS]
> 
> [...etc...]
> 
> Commands:
>   fetch  Downloads packages for later installation or study.
>   installInstalls a list of packages.
>   update Updates list of known packages
>   clean  Removes downloaded files
>   list   List available packages on the server.
>   info   Emit some info
> [EMAIL PROTECTED]: .../haskell/cabal-install-0.4.0 > cd ..
> [EMAIL PROTECTED]: .../software/haskell > cabal info
> Config file /home/ben/.cabal/config not found.
> Writing default configuration to /home/ben/.cabal/config.
> cabal: dist/Conftest.c: openFile: does not exist (No such file or directory)
> 

This one is due to having an out of date cabal. Upgrade to darcs cabal,
then rebuild cabal-install, and things should go fine.

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


Re: [Haskell-cafe] cabal-install

2007-11-28 Thread Duncan Coutts
On Tue, 2007-11-27 at 18:02 -0800, Don Stewart wrote:
> ben.franksen:
> > Just thought I install the latest version (0.4.0) from hackage and test it.
> > Build and install went fine, but then it gets strange:
> > 
> > cabal: dist/Conftest.c: openFile: does not exist (No such file or directory)
> > 
> 
> This one is due to having an out of date cabal. Upgrade to darcs cabal,
> then rebuild cabal-install, and things should go fine.

Yes, this was rather unfortunate. A fix for something else that we put
into Cabal at the last minute ended up breaking cabal-install. As Don
says, it's fixed in the darcs version of Cabal (HEAD and 1.2 branch)
which will also be released with ghc-6.8.2 (or possibly earlier if that
looks like it's going to take a while).

Duncan

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


[Haskell-cafe] cabal and hpc?

2008-01-14 Thread Greg Fitzgerald
Has the Haskell Program Coverage tool been integrated into Cabal?  That is,
is there anything like "runhaskell Setup.hs coverage" to generate a coverage
report?

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


[Haskell-cafe] cabal --user question

2005-07-10 Thread Frederik Eaton
Hi,

How do I install a package in the user package.conf with cabal? It is
not clear to me how to do this, looking at the output of 'configure
--help'. There is an option "--user" to get dependencies from the user
cabal file but this still, somewhat counterintuitively, tries to
install the package in the global location (why would one want such
behavior?). Specifying '--with-hc-pkg="ghc-pkg --user"' doesn't seem
to work either, when I do this then 'install' and 'unregister'
complete without error but apparently have no effect.

Thanks in advance,

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


Re: [Haskell-cafe] cabal errors

2008-02-29 Thread Duncan Coutts

On Thu, 2008-02-28 at 07:10 -0500, Kristofer Buffington wrote:
> Hi
> 
> I installed ghc 6.8 from source and I've been installing packages from
> hackage. I'm not sure when the problem started, but I've been getting
> this error trying to install any cabal package.. accept apparently,
> Cabal itself.

(Which is because Cabal does not use the installed Cabal lib to build
itself, it bootstraps from its own source code.)

> Setup.hs:2:0:
> Warning: Deprecated use of `defaultUserHooks'
>  (imported from Distribution.Simple):
>  Use simpleUserHooks or autoconfUserHooks
> Setup: /usr/local/lib/Cabal-1.3.6/ghc-6.8.2.20080225/HSCabal-1.3.6.o:
> unknown symbol `directoryzm1zi0zi0zi0_SystemziDirectory_a9_closure'
> Setup: exception :: GhcException
> 
> Any ideas?

My first suggestion would be to clean and rebuild your development
version of Cabal. Once it's re-registered, see if "ghci -package Cabal"
works.

Duncan

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


Re: [Haskell-cafe] cabal errors

2008-02-29 Thread Ross Paterson
On Thu, Feb 28, 2008 at 07:10:03AM -0500, Kristofer Buffington wrote:
> I installed ghc 6.8 from source and I've been installing packages from
> hackage.  I'm not sure when the problem started, but I've been getting
> this error trying to install any cabal package.. accept apparently,
> Cabal itself.
> 
> Setup.hs:2:0:
> Warning: Deprecated use of `defaultUserHooks'
>  (imported from Distribution.Simple):
>  Use simpleUserHooks or autoconfUserHooks
> Setup: /usr/local/lib/Cabal-1.3.6/ghc-6.8.2.20080225/HSCabal-1.3.6.o: unknown
> symbol `directoryzm1zi0zi0zi0_SystemziDirectory_a9_closure'
> Setup: exception :: GhcException

I've seen this too.  Have you somehow rebuilt directory-1.0.0.0 using
Cabal?  If so, the Cabal-built library exports different internal symbols
from the version built with ghc-6.8.2, even though it's the same source
compiled with the same version of GHC.  Any library built against the
earlier version will no longer work.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] .cabal problem

2008-03-01 Thread Adam Langley
2008/3/1 Galchin Vasili <[EMAIL PROTECTED]>:
> I am trying to install a package on my Linux Ubuntu machine. It chokes
> build-depends:  base, directory because directory dependency is
> unresolvable. Do I have to specify "extra-libs" so that correct library
> space is searched? Actually I tried this and it didn't help. ??

So, here's[1] the package "directory", however it ships with GHC, so
you very probably already have it installed. Try `ghc-pkg describe
directory` to check. Also, run `ghc --version` to see what version of
GHC you are running. If it's < 6.8, you may have problems because the
directory package didn't exist before then, I believe the same modules
were in the base package. In that case, the easy solution is probably
to upgrade GHC.


[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/directory-1.0.0.0


AGL

-- 
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] .cabal problem

2008-03-01 Thread Galchin Vasili
exactly .. I have version 6.6.1 ... question is how do I get the Unbuntu
package for version 6.8?

V.

On Sat, Mar 1, 2008 at 8:02 PM, Adam Langley <[EMAIL PROTECTED]> wrote:

> 2008/3/1 Galchin Vasili <[EMAIL PROTECTED]>:
> > I am trying to install a package on my Linux Ubuntu machine. It
> chokes
> > build-depends:  base, directory because directory dependency is
> > unresolvable. Do I have to specify "extra-libs" so that correct library
> > space is searched? Actually I tried this and it didn't help. ??
>
> So, here's[1] the package "directory", however it ships with GHC, so
> you very probably already have it installed. Try `ghc-pkg describe
> directory` to check. Also, run `ghc --version` to see what version of
> GHC you are running. If it's < 6.8, you may have problems because the
> directory package didn't exist before then, I believe the same modules
> were in the base package. In that case, the easy solution is probably
> to upgrade GHC.
>
>
> [1]
> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/directory-1.0.0.0
>
>
> AGL
>
> --
> Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] CABAL: conditional executable?

2008-03-04 Thread Magnus Therning
I'm putting together a package consisting of 2 executables. Only one of
them is pure Haskell and thus buildable on all platforms, the other
relies on Windows API calls and can only be built on that platform.  I
found the “if os(...)” conditional in the CABAL docs but I'm having
problems getting it to do what I want.

if os(mingw32)
  executable foo
...

Results in the error “Section expected”.  Swapping the two lines like this

executable foo
  if os(mingw32)
...

results in “Setup.hs: Error: No 'Main-Is' field found for executable foo”.

Is there a way to get CABAL to do what I want or should I raise a
feature request on the CABAL trac?

/M

-- 
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus@therning.org Jabber: magnus.therning@gmail.com
http://therning.org/magnus

What if I don't want to obey the laws? Do they throw me in jail with
the other bad monads?
 -- Daveman



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


[Haskell-cafe] cabal-install failure

2008-06-13 Thread Darrin Thompson
Cabal-install is looking good. It now, for the record, has only two
deps outside of Cabal-1.4.

I installed cabal-install-0.5 on ubuntu with the haskell.org linux
binary for ghc 6.8.2.

I then tried cabal-install yi

Got this output:
... many successful installs ...
Registering vty-3.0.1...
Reading package info from "dist/installed-pkg-config" ... done.
Saving old package config file... done.
Writing new package config file... done.
Downloading yi-0.3...
[1 of 1] Compiling Main ( Setup.hs, dist/setup/Main.o )

Setup.hs:9:0:
Warning: Deprecated use of `showPackageId'
 (imported from Distribution.Simple, but defined in
Distribution.Package):
 use the Text class instead
Linking dist/setup/setup ...
Warning: defaultUserHooks in Setup script is deprecated.
Configuring yi-0.3...
Warning: Instead of 'ghc-options: -DDYNAMIC -DFRONTEND_VTY' use 'cpp-options:
-DDYNAMIC -DFRONTEND_VTY'
setup: alex version >=2.0.1 && <3 is required but it could not be found.
cabal: Error: some packages failed to install:
yi-0.3 failed during the configure step. The exception was:
exit: ExitFailure 1

Is this a cabal problem of package problem? I would have expected it
to fail immediately instead of discover this problem so far into
process.

Thanks.

--
Darrin
___
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  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  wrote:
> Hi Greg,
>
> On Mon, Nov 19, 2012 at 1:25 PM, Gregory Guthrie  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  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\guthrie>cabal 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  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 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" 
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  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:
>
> ** **
>
> : 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  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:
>
> ** **
>
> : 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 :
> On Tue, Nov 20, 2012 at 1:10 PM, Gregory Guthrie  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:
>>
>>
>>
>> : 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  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"  wrote:

> On Tue, Nov 20, 2012 at 5:14 PM, Albert Y. C. Lai  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  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
wrote:

> 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-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 :
> 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  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?



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 :
> On Tue, Nov 20, 2012 at 1:10 PM, Gregory Guthrie  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:
>>
>>
>>
>> : 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 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 amou

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
 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
 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
> > 1>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

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


[Haskell-cafe] cabal install oddities

2013-03-12 Thread Tycho Andersen
Hi all,

I'm having some strange issues with cabal install. Some packages
installed via `cabal install $foo` are failing for strange (and
seemingly unrelated) reasons, but install just fine when I do
something like:

  cabal unpack network
  cd network
  cabal configure
  cabal install

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.
If you meant to cross compile, use `--host'.
See `config.log' for more details
Failed to install network-2.4.1.2
cabal: Error: some packages failed to install:
network-2.4.1.2 failed during the configure step. The exception was:
ExitFailure 1
ps168825:~/playground 1$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library 
ps168825:~/playground$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.2

/tmp/network-* doesn't exist (which is why I tried unpack, but
unfortunately that succeeds).

Any thoughts on how I can debug this?

Thanks,

\t

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


[Haskell-cafe] cabal install pandoc

2013-03-28 Thread Roger Mason

Hello,

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...
: cannot satisfy -package-id 
array-0.4.0.1-db49bb8b0087ae85b5875d4c0cc12874

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

There are then errors for other packages that depend on 'text' or 'array'.

I will be grateful for any help.

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


[Haskell-cafe] Cabal --enable-tests

2013-09-09 Thread satvik chauhan
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


Re: [Haskell-cafe] cabal mystery (#562?)

2010-10-28 Thread Daniel Fischer
On Thursday 28 October 2010 15:08:09, Conor McBride wrote:
> So I poked about a bit, and I see it's a known issue. As a user, I'm
> wondering what to do.

Try with HTTP-4000.0.9 instead of 4000.0.7?

>
> Just now,
>
>    wget http://hackage.haskell.org/packages/archive/00-index.tar.gz
>
> is chugging away quite nicely.
>
> Anyhow, is there
>    (a) something I can do to avoid this problem? I couldn't quite
>          grasp what to do from the TRAC
>    (b) some way to persuade cabal to use the file I'm currently
>          downloading?
>
> Any tips to keep the gremlins at bay gratefully appreciated.

Don't feed after midnight, don't get them wet, I think were the tips.

>
> Thanks
>
> Conor

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


Re: [Haskell-cafe] cabal update error

2010-11-13 Thread Ivan Lazar Miljenovic
On 13 November 2010 19:48, Daniel Díaz  wrote:
> Hi all,
>
> I just installed the Haskell Platform, and when I try "cabal update", I
> have the following output:
>
>> Downloading the latest package list from hackage.haskell.org
>> cabal: failed
>
> This error does not give me information about what is wrong. Has anyone
> had this error before?
>
> I would appreciate an explanation (or possible explanation), rather than
> an "update it manually".

I would guess that it's related to
http://www.reddit.com/r/haskell/comments/e5db7/alert_hackage_downtime_tomorrow_0600_1200_pst/

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


Re: [Haskell-cafe] cabal update error

2010-11-13 Thread Daniel Díaz

El Sab, 13 de Noviembre de 2010, 10:33 am, Ivan Lazar Miljenovic escribió:
> On 13 November 2010 19:48, Daniel Díaz  wrote:
>> Hi all,
>>
>> I just installed the Haskell Platform, and when I try "cabal update", I
>> have the following output:
>>
>>> Downloading the latest package list from hackage.haskell.org
>>> cabal: failed
>>
>> This error does not give me information about what is wrong. Has anyone
>> had this error before?
>>
>> I would appreciate an explanation (or possible explanation), rather than
>> an "update it manually".
>
> I would guess that it's related to
> http://www.reddit.com/r/haskell/comments/e5db7/alert_hackage_downtime_tomorrow_0600_1200_pst/
>
> --
> Ivan Lazar Miljenovic
> ivan.miljeno...@gmail.com
> IvanMiljenovic.wordpress.com
>

Thanks, Ivan.

-- 
Daniel Díaz

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


Re: [Haskell-cafe] cabal update error

2010-11-13 Thread Ross Paterson
On Sat, Nov 13, 2010 at 08:33:18PM +1100, Ivan Lazar Miljenovic wrote:
> I would guess that it's related to
> http://www.reddit.com/r/haskell/comments/e5db7/alert_hackage_downtime_tomorrow_0600_1200_pst/

That would be 14:00 - 20:00 UTC, wouldn't it?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Cabal-install is broken

2010-11-22 Thread Permjacov Evgeniy
current cabal-install (0.8.2) cannot be compiled with ghc-7.0.1 set of
boot libraries. It requires cabal 1.8.* wich fails to compile. Does
anyone worked this out ?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Cabal sdist bug patch

2010-12-01 Thread John D. Ramsdell
So as far as I can tell, it's easy to fix the cabal sdist bug.  The
module that generates a distribution simply has to use
insntallOrdinaryFile when copying files, not the version of copyFile
that is exported by Distribution.Simple.Util.  I'll respond to the
open ticket with this patch later today.

John

$ diff -ur ocabal-1.8 cabal-1.8
Only in cabal-1.8: .darcs-boring
diff -ur ocabal-1.8/Distribution/Simple/SrcDist.hs
cabal-1.8/Distribution/Simple/SrcDist.hs
--- ocabal-1.8/Distribution/Simple/SrcDist.hs   2010-12-01
11:16:00.629309262 -0500
+++ cabal-1.8/Distribution/Simple/SrcDist.hs2010-12-01 11:18:37.449933651 
-0500
@@ -78,7 +78,7 @@
  ( Version(versionBranch) )
 import Distribution.Simple.Utils
  ( createDirectoryIfMissingVerbose, withUTF8FileContents, writeUTF8File
- , copyFiles, copyFileVerbose
+ , installOrdinaryFile, installOrdinaryFiles
  , findFile, findFileWithExtension, matchFileGlob
  , withTempDirectory, defaultPackageDesc
  , die, warn, notice, setupMessage )
@@ -341,6 +341,12 @@
   createDirectoryIfMissingVerbose verbosity True (takeDirectory targetFile)
   copyFileVerbose verbosity file targetFile

+copyFileVerbose :: Verbosity -> FilePath -> FilePath -> IO ()
+copyFileVerbose = installOrdinaryFile
+
+copyFiles :: Verbosity -> FilePath -> [(FilePath, FilePath)] -> IO ()
+copyFiles = installOrdinaryFiles
+
 printPackageProblems :: Verbosity -> PackageDescription -> IO ()
 printPackageProblems verbosity pkg_descr = do
   ioChecks  <- checkPackageFiles pkg_descr "."
$
Only in cabal-1.8: .darcs-boring
diff -ur ocabal-1.8/Distribution/Simple/SrcDist.hs cabal-1.8/Distribution/Simple/SrcDist.hs
--- ocabal-1.8/Distribution/Simple/SrcDist.hs	2010-12-01 11:16:00.629309262 -0500
+++ cabal-1.8/Distribution/Simple/SrcDist.hs	2010-12-01 11:18:37.449933651 -0500
@@ -78,7 +78,7 @@
  ( Version(versionBranch) )
 import Distribution.Simple.Utils
  ( createDirectoryIfMissingVerbose, withUTF8FileContents, writeUTF8File
- , copyFiles, copyFileVerbose
+ , installOrdinaryFile, installOrdinaryFiles
  , findFile, findFileWithExtension, matchFileGlob
  , withTempDirectory, defaultPackageDesc
  , die, warn, notice, setupMessage )
@@ -341,6 +341,12 @@
   createDirectoryIfMissingVerbose verbosity True (takeDirectory targetFile)
   copyFileVerbose verbosity file targetFile
 
+copyFileVerbose :: Verbosity -> FilePath -> FilePath -> IO ()
+copyFileVerbose = installOrdinaryFile
+
+copyFiles :: Verbosity -> FilePath -> [(FilePath, FilePath)] -> IO ()
+copyFiles = installOrdinaryFiles
+
 printPackageProblems :: Verbosity -> PackageDescription -> IO ()
 printPackageProblems verbosity pkg_descr = do
   ioChecks  <- checkPackageFiles pkg_descr "."
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Ivan Lazar Miljenovic
On 16 December 2010 13:35, Magicloud Magiclouds
 wrote:
> Hi,
>  I see this kind of information a lot when I using cabal to install
> package. Or sometimes same packages both exist in global and user
> space, which is a "shadowed by" message.
>  How to resolve that? Thanks.
>
> Resolving dependencies...
> : cannot satisfy -package Cabal-1.10.0.0:
>    Cabal-1.10.0.0-9ac678c7f1e4f8dd31bac0e19f600698 is unusable due to
> missing or recursive dependencies:
>      process-1.0.1.4-24e3819e5c17aaf49bfec6a0ab739420
>    (use -v for more information)

This means you built Cabal-1.10.0.0 against process-1.0.1.4, but have
subsequently upgraded (or downgraded or uninstalled) process.  As
such, rebuild Cabal.

"ghc-pkg check" will give you a list of all broken packages.

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

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


<    1   2   3   4   5   6   7   8   9   10   >