Re: [Haskell-cafe] Cabal fun [Half-integer]

2009-07-04 Thread Andrew Coppin

Antoine Latter wrote:

Personally, I've never used runhaskell Setup sdist and I've only
ever used cabal sdist. But I'm not sure where I learned that.

I think cabal-install is a pretty standard util for people to have,
and it ships with the Haskell platform now. So the big hurdle is
documentation.

Andrew - where does it state that Setup sdist is the recommended way
of doing this? If it's a wiki you could go and edit it yourself.
  


Start from the Hackage homepage:

 http://hackage.haskell.org/packages/hackage.html

Click on how to create a Haskell package, takes you to

 http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program

Section 2.10.1.1 shows you how to create a tarball - using setup sdist 
rather than cabal sdist. Indeed, I don't think cabal-install is 
mentioned anywhere.


If people seriously want this to become the preferred way to do things, 
it needs to be much more prominently documented.


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


Re: [Haskell-cafe] Cabal fun [Half-integer]

2009-06-29 Thread Andrew Coppin

Derek Elkins wrote:

On Sun, Jun 28, 2009 at 4:11 PM, Antoine Latteraslat...@gmail.com wrote:
  

On Sun, Jun 28, 2009 at 3:42 PM, Andrew
Coppinandrewcop...@btinternet.com wrote:


Ah. Apparently it's fixed:

http://hackage.haskell.org/trac/hackage/ticket/40
  
Except that it isn't fixed. Yay for me..

If one actually reads the discussion in the ticket, it is clear that
the conclusion was to have cabal-install handle it and that
cabal-install uses it's own tar implementation.
  


This was not at all clear to me from reading the ticker.

OK, so I need to find another seperate tool in order to do this. I guess 
not every single Haskell user tries to release stuff to Hackage, while 
presumably most users want to install stuff from it. I could just about 
live with that. However, the following important question remains: If 
sdist is broken on Windows, and the developers know this, why does it 
just die with an unhelpful message? Why does it not say this 
functionallity is not supported; you need to get this tool...? Why did 
I have to do a custom search of closed tickets on the Trac to even find 
this information? Why is this not written in big, huge letters in the 
user guide? The fact that this is broken by default on every Windows box 
in the land seems like a rather big deal...


Seriously... when the next person behind me comes along and tries to do 
this, they're going to trip over in exactly the same way. All the Cabal 
guides I've seen so far recommend the use of sdist. (And, indeed, on any 
other OS it presumably works. It's just another thing you have to do 
differently if you happen to be on Windows.)


GHC already ships with Cabal, and half a dozen GNU utilities; would it 
have been so hard to just add tar.exe?


Anyway, I now [hopefully] have a way to fix my immediate problem. I hope 
the people in charge will do something to help the next guy behind me...


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


Re: [Haskell-cafe] Cabal fun [Half-integer]

2009-06-29 Thread Antoine Latter
On Mon, Jun 29, 2009 at 1:03 PM, Andrew
Coppinandrewcop...@btinternet.com wrote:

 This was not at all clear to me from reading the ticker.

 OK, so I need to find another seperate tool in order to do this. I guess not
 every single Haskell user tries to release stuff to Hackage, while
 presumably most users want to install stuff from it. I could just about live
 with that. However, the following important question remains: If sdist is
 broken on Windows, and the developers know this, why does it just die with
 an unhelpful message? Why does it not say this functionallity is not
 supported; you need to get this tool...? Why did I have to do a custom
 search of closed tickets on the Trac to even find this information? Why is
 this not written in big, huge letters in the user guide? The fact that this
 is broken by default on every Windows box in the land seems like a rather
 big deal...

 Seriously... when the next person behind me comes along and tries to do
 this, they're going to trip over in exactly the same way. All the Cabal
 guides I've seen so far recommend the use of sdist. (And, indeed, on any
 other OS it presumably works. It's just another thing you have to do
 differently if you happen to be on Windows.)

 GHC already ships with Cabal, and half a dozen GNU utilities; would it have
 been so hard to just add tar.exe?

 Anyway, I now [hopefully] have a way to fix my immediate problem. I hope the
 people in charge will do something to help the next guy behind me...


Personally, I've never used runhaskell Setup sdist and I've only
ever used cabal sdist. But I'm not sure where I learned that.

I think cabal-install is a pretty standard util for people to have,
and it ships with the Haskell platform now. So the big hurdle is
documentation.

Andrew - where does it state that Setup sdist is the recommended way
of doing this? If it's a wiki you could go and edit it yourself.

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


Re: [Haskell-cafe] Cabal fun [Half-integer]

2009-06-29 Thread Andrew Coppin

Antoine Latter wrote:

Personally, I've never used runhaskell Setup sdist and I've only
ever used cabal sdist. But I'm not sure where I learned that.

I think cabal-install is a pretty standard util for people to have,
and it ships with the Haskell platform now. So the big hurdle is
documentation.
  


Indeed. I've heard a few people claim that cabal-install is the best 
thing since sliced bread, but I've never touched it. I don't even know 
where to get it. (Presumably this will become fairly obvious once I go 
look for it...)



Andrew - where does it state that Setup sdist is the recommended way
of doing this? If it's a wiki you could go and edit it yourself.
  


The link posted earlier:

http://en.wikibooks.org/wiki/Haskell/Packaging#The_Cabal_file

I'm pretty sure there's some essentially similar content on the Haskell 
wiki. (Or there was... I don't know if it got removed when this was put up.)


The Cabal manual itself mentions absolutely nothing about cabal-install, 
as far as I can tell. (At least, I didn't see anything about it while I 
was looking up the *.cabal format nor the command invocation syntax.)


It's news to me that cabal-install ships with the Haskell Platform. (Can 
you tell how much I've tried out the Platform?) I'm still not completely 
understanding the direction we're going with this - but that's for 
another email...


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


Re: [Haskell-cafe] Cabal fun [Half-integer]

2009-06-29 Thread Andrew Coppin

Andrew Coppin wrote:
Indeed. I've heard a few people claim that cabal-install is the best 
thing since sliced bread, but I've never touched it. I don't even know 
where to get it. (Presumably this will become fairly obvious once I go 
look for it...)


Fortunately, it turns out that a trivial Google search is all that is 
required to locate cabal-install. (Assuming you already know it exists.) 
Unfortunately I got as far as actually downloading the sources from 
Hackage before discovering that on Windows you actually need to download 
the pre-build binary. (Couldn't you mention this on the Hackage download 
page?)


Also fortunately, it appears to be pretty trivial to operate 
cabal-install. I didn't bother reading any instructions, just cabal 
--help. (Not sure why it needs to download the package list from Hackage 
- or where it puts it. But I'm sure there's a good reason.)


Rather less fortunately, it still doesn't actually fix my problem:

E:\Haskell\AOC-HalfIntegercabal configure
Resolving dependencies...
Configuring AOC-HalfInteger-1.0...

E:\Haskell\AOC-HalfIntegercabal sdist
Building source dist for AOC-HalfInteger-1.0...
Preprocessing library AOC-HalfInteger-1.0...
Source tarball created: dist\AOC-HalfInteger-1.0.tar.gz
cabal: dist\src\sdist.1288\AOC-HalfInteger-1.0\Data\HalfInteger.hs: 
removeFile: permission denied (Permission denied)


I have no idea what the hell it's upset about now... I've now been 
trying to create this damned tarball since 5PM yesterday, and I still 
haven't managed it. At this point I'm losing the will to continue with 
this crazy project. Clearly this is way too much effort to expend just 
to upload 50 lines of code.


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


Re: [Haskell-cafe] Cabal fun [Half-integer]

2009-06-29 Thread Jason Dagit
On Mon, Jun 29, 2009 at 11:57 AM, Andrew Coppin andrewcop...@btinternet.com
 wrote:

 Andrew Coppin wrote:

 Indeed. I've heard a few people claim that cabal-install is the best thing
 since sliced bread, but I've never touched it. I don't even know where to
 get it. (Presumably this will become fairly obvious once I go look for
 it...)


 Fortunately, it turns out that a trivial Google search is all that is
 required to locate cabal-install. (Assuming you already know it exists.)
 Unfortunately I got as far as actually downloading the sources from Hackage
 before discovering that on Windows you actually need to download the
 pre-build binary. (Couldn't you mention this on the Hackage download page?)

 Also fortunately, it appears to be pretty trivial to operate cabal-install.
 I didn't bother reading any instructions, just cabal --help. (Not sure why
 it needs to download the package list from Hackage - or where it puts it.
 But I'm sure there's a good reason.)

 Rather less fortunately, it still doesn't actually fix my problem:

 E:\Haskell\AOC-HalfIntegercabal configure
 Resolving dependencies...
 Configuring AOC-HalfInteger-1.0...

 E:\Haskell\AOC-HalfIntegercabal sdist
 Building source dist for AOC-HalfInteger-1.0...
 Preprocessing library AOC-HalfInteger-1.0...
 Source tarball created: dist\AOC-HalfInteger-1.0.tar.gz
 cabal: dist\src\sdist.1288\AOC-HalfInteger-1.0\Data\HalfInteger.hs:
 removeFile: permission denied (Permission denied)

 I have no idea what the hell it's upset about now... I've now been trying
 to create this damned tarball since 5PM yesterday, and I still haven't
 managed it. At this point I'm losing the will to continue with this crazy
 project. Clearly this is way too much effort to expend just to upload 50
 lines of code.


I can't say for certain, but just reading the output it looks like it
created a tarball in a temporary folder (that worked) and then when it tried
to clean it up it failed.  Sounds like a bug report is in order.

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


Re: [Haskell-cafe] Cabal fun [Half-integer]

2009-06-29 Thread Antoine Latter
On Mon, Jun 29, 2009 at 2:12 PM, Jason Dagitda...@codersbase.com wrote:


 I can't say for certain, but just reading the output it looks like it
 created a tarball in a temporary folder (that worked) and then when it tried
 to clean it up it failed.  Sounds like a bug report is in order.


You may want to check the dist subdirectory of the folder you're
working in to see if it made the tarball.

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


Re: [Haskell-cafe] Cabal fun [Half-integer]

2009-06-29 Thread Andrew Coppin

Jason Dagit wrote:



On Mon, Jun 29, 2009 at 11:57 AM, Andrew Coppin 
andrewcop...@btinternet.com mailto:andrewcop...@btinternet.com wrote:


Rather less fortunately, it still doesn't actually fix my problem:

E:\Haskell\AOC-HalfIntegercabal configure
Resolving dependencies...
Configuring AOC-HalfInteger-1.0...

E:\Haskell\AOC-HalfIntegercabal sdist

Building source dist for AOC-HalfInteger-1.0...
Preprocessing library AOC-HalfInteger-1.0...
Source tarball created: dist\AOC-HalfInteger-1.0.tar.gz
cabal:
dist\src\sdist.1288\AOC-HalfInteger-1.0\Data\HalfInteger.hs:
removeFile: permission denied (Permission denied)

I have no idea what the hell it's upset about now... I've now been
trying to create this damned tarball since 5PM yesterday, and I
still haven't managed it. At this point I'm losing the will to
continue with this crazy project. Clearly this is way too much
effort to expend just to upload 50 lines of code.


I can't say for certain, but just reading the output it looks like it 
created a tarball in a temporary folder (that worked) and then when it 
tried to clean it up it failed.  Sounds like a bug report is in order.


So, yet again, it appears I'm the first poor soul to try using this on 
Windows.


The very first time I tried to use Gtk2hs, the installer for Windows was 
trivially broken. In fairness, Duncan fixed this within an hour or two 
of me pointing out the problem. But the fact remains: It had been out 
for a week, and I was the *only* person to have tried to use it on 
Windows. (Or possibly the only person to actually complain, rather than 
just give up.) Don kept telling me about some cool Core syntax hilighter 
he wrote, so I went to all the trouble of downloading it, downloading 
and building all of its dependencies, only to discover oh, by the way, 
it only works on Linux. A while back Cabal had a bug where (on Windows 
only) it couldn't find ld or something daft. [Again, fortunately that 
one got corrected - eventually - in the next GHC release.] I try to run 
sdist, and discover that that's broken on Windows too. But don't worry, 
there's a replacement tool... which is also broken on Windows... This is 
an exercise in pure frustration! Sometimes it seems as if *everything* 
is broken on Windows.


Hmm... I'm just ranting now. One presumes that when they fixed cabal 
sdist to work on Windows, at least one person checked that it did, in 
fact, work. That would mean it got broken again at some point after 
this. Maybe I just need to find an older version or something...


And after that... I guess I create *another* account on *another* bug 
tracker and submit *another* hey, this is broken on Windows ticket...


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


Re: [Haskell-cafe] Cabal fun [Half-integer]

2009-06-29 Thread Ross Mellgren
I presume that many of the developers do not have windows machines  
(presumably because windows sucks). Maybe you could help them by  
trying to track down where the error in the code is, and even better  
yet submitting a patch?


This is all free by the virtue of people giving what time they can,  
and if you don't happen to have a windows box to test on, it can be  
very hard to provide compatibility for it. Same in the reverse  
direction.


-Ross

On Jun 29, 2009, at 3:55 PM, Andrew Coppin wrote:


Jason Dagit wrote:



On Mon, Jun 29, 2009 at 11:57 AM, Andrew Coppin andrewcop...@btinternet.com 
 mailto:andrewcop...@btinternet.com wrote:


   Rather less fortunately, it still doesn't actually fix my problem:

   E:\Haskell\AOC-HalfIntegercabal configure
   Resolving dependencies...
   Configuring AOC-HalfInteger-1.0...

   E:\Haskell\AOC-HalfIntegercabal sdist

   Building source dist for AOC-HalfInteger-1.0...
   Preprocessing library AOC-HalfInteger-1.0...
   Source tarball created: dist\AOC-HalfInteger-1.0.tar.gz
   cabal:
   dist\src\sdist.1288\AOC-HalfInteger-1.0\Data\HalfInteger.hs:
   removeFile: permission denied (Permission denied)

   I have no idea what the hell it's upset about now... I've now been
   trying to create this damned tarball since 5PM yesterday, and I
   still haven't managed it. At this point I'm losing the will to
   continue with this crazy project. Clearly this is way too much
   effort to expend just to upload 50 lines of code.


I can't say for certain, but just reading the output it looks like  
it created a tarball in a temporary folder (that worked) and then  
when it tried to clean it up it failed.  Sounds like a bug report  
is in order.


So, yet again, it appears I'm the first poor soul to try using this  
on Windows.


The very first time I tried to use Gtk2hs, the installer for Windows  
was trivially broken. In fairness, Duncan fixed this within an hour  
or two of me pointing out the problem. But the fact remains: It had  
been out for a week, and I was the *only* person to have tried to  
use it on Windows. (Or possibly the only person to actually  
complain, rather than just give up.) Don kept telling me about some  
cool Core syntax hilighter he wrote, so I went to all the trouble of  
downloading it, downloading and building all of its dependencies,  
only to discover oh, by the way, it only works on Linux. A while  
back Cabal had a bug where (on Windows only) it couldn't find ld or  
something daft. [Again, fortunately that one got corrected -  
eventually - in the next GHC release.] I try to run sdist, and  
discover that that's broken on Windows too. But don't worry, there's  
a replacement tool... which is also broken on Windows... This is an  
exercise in pure frustration! Sometimes it seems as if *everything*  
is broken on Windows.


Hmm... I'm just ranting now. One presumes that when they fixed  
cabal sdist to work on Windows, at least one person checked that it  
did, in fact, work. That would mean it got broken again at some  
point after this. Maybe I just need to find an older version or  
something...


And after that... I guess I create *another* account on *another*  
bug tracker and submit *another* hey, this is broken on Windows  
ticket...


___
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 fun [Half-integer]

2009-06-29 Thread Andrew Coppin

Ross Mellgren wrote:
I presume that many of the developers do not have windows machines 
(presumably because windows sucks). Maybe you could help them by 
trying to track down where the error in the code is, and even better 
yet submitting a patch?


This is all free by the virtue of people giving what time they can, 
and if you don't happen to have a windows box to test on, it can be 
very hard to provide compatibility for it. Same in the reverse direction.


-Ross


Well, Duncan informs me that he's just set up a Windows XP VM for this 
exact reason... Still, I guess this problem will only really be solved 
once he have large quantities of Windows users hitting this stuff.


Indeed, Duncan seems to be one of the more helpful inhabitants of the 
Haskell IRC channel. I talked to him tonight, and he's already fixed 
some of the documentation issues I pointed out earlier, and done a 
preliminary analysis of the sdist bug. (It's filed as ticket #565 now, 
by the way.)


Anyway, for the time being, cabal-install does in fact generate the 
tarball, it's just tripping over trying to delete the temp files 
afterwards. So I can still uplo-- wait, you need an account?


Is anything ELSE going to stop me??

Time for bed, I think...

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


Re: [Haskell-cafe] Cabal fun [Half-integer]

2009-06-29 Thread Jason Dagit
On Mon, Jun 29, 2009 at 12:55 PM, Andrew Coppin andrewcop...@btinternet.com
 wrote:

This is an exercise in pure frustration! Sometimes it seems as if
 *everything* is broken on Windows.


In my opinion you're right, Windows, and things built on it, tend to be very
broken.  Maybe that's why so many of the Haskell devs aren't using Windows?



 Hmm... I'm just ranting now.


Yes, you are :)  You'll catch more flies with honey than vinegar.

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


[Haskell-cafe] Cabal fun [Half-integer]

2009-06-28 Thread Andrew Coppin

Max Rabkin wrote:

On Sun, Jun 28, 2009 at 9:29 PM, Andrew
Coppinandrewcop...@btinternet.com wrote:
  

Which versions of base have you tested it with?  :-)

  

Whichever one GHC 6.10.3 ships with...



ghc-pkg list base will tell you which version you have installed.
  


Which tells me I have base-3.0.3.1 *and* base-4.1.0.0 ;-)


Frankly, I highly doubt it makes any difference either way. (Does anybody
know how base3 differs from base4?) It only uses a few type classes from the
Prelude...



If it *only* uses the prelude (i.e., does not include *any* modules),
then it should work with any version of base.
  


Yeah, that's what I figured...

Alrighty then, so how I just do Setup configure, and now Setup sdist, 
and then I can upload the result to Ha-- oh, don't be silly. That would 
simply be too easy. ;-)


E:\Haskell\AOC-HalfIntegerrunhaskell Setup sdist
Building source dist for AOC-HalfInteger-1.0...
Preprocessing library AOC-HalfInteger-1.0...
Setup: tar is required but it could not be found.

Time to go search the web and find out what the other 50 people who 
stumbled into this did... *sigh*



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


Re: [Haskell-cafe] Cabal fun [Half-integer]

2009-06-28 Thread Andrew Coppin

Andrew Coppin wrote:
Alrighty then, so how I just do Setup configure, and now Setup sdist, 
and then I can upload the result to Ha-- oh, don't be silly. That 
would simply be too easy. ;-)


E:\Haskell\AOC-HalfIntegerrunhaskell Setup sdist
Building source dist for AOC-HalfInteger-1.0...
Preprocessing library AOC-HalfInteger-1.0...
Setup: tar is required but it could not be found.

Time to go search the web and find out what the other 50 people who 
stumbled into this did... *sigh*


Ah. Apparently it's fixed:

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

Except that it isn't fixed. Yay for me...

It seems that GHC provides ar but not tar. Looks like I might actually 
have to copy the entire directory tree to a Linux box just so I can run 
sdist... Nice to know this stuff is so easy. :-/


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


Re: [Haskell-cafe] Cabal fun [Half-integer]

2009-06-28 Thread Antoine Latter
On Sun, Jun 28, 2009 at 3:42 PM, Andrew
Coppinandrewcop...@btinternet.com wrote:
 Andrew Coppin wrote:

 Alrighty then, so how I just do Setup configure, and now Setup sdist, and
 then I can upload the result to Ha-- oh, don't be silly. That would simply
 be too easy. ;-)

 E:\Haskell\AOC-HalfIntegerrunhaskell Setup sdist
 Building source dist for AOC-HalfInteger-1.0...
 Preprocessing library AOC-HalfInteger-1.0...
 Setup: tar is required but it could not be found.

 Time to go search the web and find out what the other 50 people who
 stumbled into this did... *sigh*

 Ah. Apparently it's fixed:

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

 Except that it isn't fixed. Yay for me...

 It seems that GHC provides ar but not tar. Looks like I might actually have
 to copy the entire directory tree to a Linux box just so I can run sdist...
 Nice to know this stuff is so easy. :-/


I don't know anything that's gauranteed to work, as I've never tried
packaging from a Windows box, but:

 - Is 'htar' a good enough 'tar' replacement for cabal?
 - Does cabal-install also require an external tar? You could try cabal sdist

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


Re: [Haskell-cafe] Cabal fun [Half-integer]

2009-06-28 Thread Derek Elkins
On Sun, Jun 28, 2009 at 4:11 PM, Antoine Latteraslat...@gmail.com wrote:
 On Sun, Jun 28, 2009 at 3:42 PM, Andrew
 Coppinandrewcop...@btinternet.com wrote:
 Andrew Coppin wrote:

 Alrighty then, so how I just do Setup configure, and now Setup sdist, and
 then I can upload the result to Ha-- oh, don't be silly. That would simply
 be too easy. ;-)

 E:\Haskell\AOC-HalfIntegerrunhaskell Setup sdist
 Building source dist for AOC-HalfInteger-1.0...
 Preprocessing library AOC-HalfInteger-1.0...
 Setup: tar is required but it could not be found.

 Time to go search the web and find out what the other 50 people who
 stumbled into this did... *sigh*

 Ah. Apparently it's fixed:

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

 Except that it isn't fixed. Yay for me...

 It seems that GHC provides ar but not tar. Looks like I might actually have
 to copy the entire directory tree to a Linux box just so I can run sdist...
 Nice to know this stuff is so easy. :-/


 I don't know anything that's gauranteed to work, as I've never tried
 packaging from a Windows box, but:

  - Is 'htar' a good enough 'tar' replacement for cabal?
  - Does cabal-install also require an external tar? You could try cabal 
 sdist

If one actually reads the discussion in the ticket, it is clear that
the conclusion was to have cabal-install handle it and that
cabal-install uses it's own tar implementation.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] [cabal] How to deal with build-depency that not under cabal's control?

2009-06-15 Thread Roman Cheplyaka
I'm CC:ing Duncan, probably he can help.

* Magicloud Magiclouds magicloud.magiclo...@gmail.com [2009-06-15 
10:01:03+0800]
 # ghc-pkg list gtk
 /var/lib/ghc-6.10.3/./package.conf:
 /home/shidaw/.ghc/i386-linux-6.10.3/package.conf:
 gtk-0.10.1
 Well, still, I have the problem
 
 On Sun, Jun 14, 2009 at 6:52 PM, Roman Cheplyakar...@ro-che.info wrote:
  * Magicloud Magiclouds magicloud.magiclo...@gmail.com [2009-06-14 
  18:48:26+0800]
  My gtk2hs is install manually, `configure  make  make install`. So
 
  It's okay.
 
  when I add gtk to build-dependency, it tells me
  Setup.hs: At least the following dependencies are missing:
  gtk -any
 
  Installation of gtk2hs registers these packages for you.
  Again, check `ghc-pkg list gtk`. If you installed gtk2hs, it must be
  there. If you, say, upgraded your ghc after you installed gtk2hs, you
  have to reinstall gtk2hs.
 
  How to register my manual-installed gtk2hs to cabal?
 
  On Sun, Jun 14, 2009 at 6:25 PM, Roman Cheplyakar...@ro-che.info wrote:
   * Magicloud Magiclouds magicloud.magiclo...@gmail.com [2009-06-14 
   17:30:33+0800]
   Hi,
     I use gtk2hs in linux. Well, I have no idea how to install gtk2hs by
   cabal, but my program needs it, and I want my program cabalized. So
   how to do this?
   Thanks.
  
   gtk2hs consists of several cabal packages, e.g. gtk, glib and so on.
   (See `ghc-pkg list`)
   Specify those of them you need as dependencies in cabal file.
  
   --
   Roman I. Cheplyaka :: http://ro-che.info/
   Don't let school get in the way of your education. - Mark Twain
   ___
   Haskell-Cafe mailing list
   Haskell-Cafe@haskell.org
   http://www.haskell.org/mailman/listinfo/haskell-cafe
  
 
 
 
  --
  竹密岂妨流水过
  山高哪阻野云飞
 
  --
  Roman I. Cheplyaka :: http://ro-che.info/
  Don't let school get in the way of your education. - Mark Twain
 
 
 
 
 -- 
 竹密岂妨流水过
 山高哪阻野云飞

-- 
Roman I. Cheplyaka :: http://ro-che.info/
Don't let school get in the way of your education. - Mark Twain
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] [cabal] How to deal with build-depency that not under cabal's control?

2009-06-15 Thread Duncan Coutts
http://haskell.org/cabal/FAQ.html#runghc-setup-complains-of-missing-packages


On Mon, 2009-06-15 at 10:30 +0300, Roman Cheplyaka wrote:
 I'm CC:ing Duncan, probably he can help.
 
 * Magicloud Magiclouds magicloud.magiclo...@gmail.com [2009-06-15 
 10:01:03+0800]
  # ghc-pkg list gtk
  /var/lib/ghc-6.10.3/./package.conf:
  /home/shidaw/.ghc/i386-linux-6.10.3/package.conf:
  gtk-0.10.1
  Well, still, I have the problem
  
  On Sun, Jun 14, 2009 at 6:52 PM, Roman Cheplyakar...@ro-che.info wrote:
   * Magicloud Magiclouds magicloud.magiclo...@gmail.com [2009-06-14 
   18:48:26+0800]
   My gtk2hs is install manually, `configure  make  make install`. So
  
   It's okay.
  
   when I add gtk to build-dependency, it tells me
   Setup.hs: At least the following dependencies are missing:
   gtk -any
  
   Installation of gtk2hs registers these packages for you.
   Again, check `ghc-pkg list gtk`. If you installed gtk2hs, it must be
   there. If you, say, upgraded your ghc after you installed gtk2hs, you
   have to reinstall gtk2hs.
  
   How to register my manual-installed gtk2hs to cabal?
  
   On Sun, Jun 14, 2009 at 6:25 PM, Roman Cheplyakar...@ro-che.info wrote:
* Magicloud Magiclouds magicloud.magiclo...@gmail.com [2009-06-14 
17:30:33+0800]
Hi,
  I use gtk2hs in linux. Well, I have no idea how to install gtk2hs by
cabal, but my program needs it, and I want my program cabalized. So
how to do this?
Thanks.
   
gtk2hs consists of several cabal packages, e.g. gtk, glib and so on.
(See `ghc-pkg list`)
Specify those of them you need as dependencies in cabal file.
   
--
Roman I. Cheplyaka :: http://ro-che.info/
Don't let school get in the way of your education. - Mark Twain
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
   
  
  
  
   --
   竹密岂妨流水过
   山高哪阻野云飞
  
   --
   Roman I. Cheplyaka :: http://ro-che.info/
   Don't let school get in the way of your education. - Mark Twain
  
  
  
  
  -- 
  竹密岂妨流水过
  山高哪阻野云飞
 

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


[Haskell-cafe] [cabal] How to deal with build-depency that not under cabal's control?

2009-06-14 Thread Magicloud Magiclouds
Hi,
  I use gtk2hs in linux. Well, I have no idea how to install gtk2hs by
cabal, but my program needs it, and I want my program cabalized. So
how to do this?
Thanks.
-- 
竹密岂妨流水过
山高哪阻野云飞
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] [cabal] How to deal with build-depency that not under cabal's control?

2009-06-14 Thread Roman Cheplyaka
* Magicloud Magiclouds magicloud.magiclo...@gmail.com [2009-06-14 
17:30:33+0800]
 Hi,
   I use gtk2hs in linux. Well, I have no idea how to install gtk2hs by
 cabal, but my program needs it, and I want my program cabalized. So
 how to do this?
 Thanks.

gtk2hs consists of several cabal packages, e.g. gtk, glib and so on.
(See `ghc-pkg list`)
Specify those of them you need as dependencies in cabal file.

-- 
Roman I. Cheplyaka :: http://ro-che.info/
Don't let school get in the way of your education. - Mark Twain
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] [cabal] How to deal with build-depency that not under cabal's control?

2009-06-14 Thread Roman Cheplyaka
* Magicloud Magiclouds magicloud.magiclo...@gmail.com [2009-06-14 
18:48:26+0800]
 My gtk2hs is install manually, `configure  make  make install`. So

It's okay.

 when I add gtk to build-dependency, it tells me
 Setup.hs: At least the following dependencies are missing:
 gtk -any

Installation of gtk2hs registers these packages for you.
Again, check `ghc-pkg list gtk`. If you installed gtk2hs, it must be
there. If you, say, upgraded your ghc after you installed gtk2hs, you
have to reinstall gtk2hs. 

 How to register my manual-installed gtk2hs to cabal?
 
 On Sun, Jun 14, 2009 at 6:25 PM, Roman Cheplyakar...@ro-che.info wrote:
  * Magicloud Magiclouds magicloud.magiclo...@gmail.com [2009-06-14 
  17:30:33+0800]
  Hi,
    I use gtk2hs in linux. Well, I have no idea how to install gtk2hs by
  cabal, but my program needs it, and I want my program cabalized. So
  how to do this?
  Thanks.
 
  gtk2hs consists of several cabal packages, e.g. gtk, glib and so on.
  (See `ghc-pkg list`)
  Specify those of them you need as dependencies in cabal file.
 
  --
  Roman I. Cheplyaka :: http://ro-che.info/
  Don't let school get in the way of your education. - Mark Twain
  ___
  Haskell-Cafe mailing list
  Haskell-Cafe@haskell.org
  http://www.haskell.org/mailman/listinfo/haskell-cafe
 
 
 
 
 -- 
 竹密岂妨流水过
 山高哪阻野云飞

-- 
Roman I. Cheplyaka :: http://ro-che.info/
Don't let school get in the way of your education. - Mark Twain
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal addressibility problem

2009-06-08 Thread Malcolm Wallace
Vasili I. Galchin vigalc...@gmail.com wrote:

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

The Main-Is: line is wrong: it should be:

Main-Is:Swish/HaskellRDF/GraphPartitionTest.hs

That is, it should name a filepath (usings slashes), not a module (using
dots).

Regards,
Malcolm
___
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


Re: [Haskell-cafe] Cabal addressibility problem

2009-06-05 Thread Gwern Branwen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On Fri, Jun 5, 2009 at 3:33 PM, Vasili I. Galchin wrote:
 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

You need to give more detail.

For example, is your directory layout like
'./src/Swish/HaskellRDF.../foo.hs'? In that case, Cabal is looking for
'./Swish/HaskellRDF.../foo.hs'. You need to tell it to look in src/
and not ./ with a line like 'hs-source-dirs: src/' etc.

- --
gwern
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAkopdUsACgkQvpDo5Pfl1oLbCgCfWI1MZOyWnsyAkra88S/LC506
7oMAoJhv5hDcc1Ypqq0hLncB2t/1Yuby
=ADOt
-END PGP SIGNATURE-
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal addressibility problem

2009-06-05 Thread Vasili I. Galchin
for directory structure I Swish-0.2.1/Swish/HaskellRDF and
Swish-0.2.1/Swish/HaskellUtils  ... there are deeper directories but that
distract from the discussion ... to make things concete:

1) swish.cabal is directly under Swish-0.2.1

2) GraphPartitionTest.hs is under Swish-0.2.1/Swish/HaskellRDF

3) GraphPartitionTest's dependencies are either under HaskellRDF or
HaskellUtils

Hope this helps to make things clearer. I added a Hs-source-dirs but that
help.

I did a ruinhaskell Setup -? to check on options. I don't see any verbose
mode so that when I do runhaskell Setup build I can moniitor the progress
of my build for diagnostic purposes! Is there a verbose mode?

Thanks,

Vasili

On Fri, Jun 5, 2009 at 2:43 PM, Gwern Branwen gwe...@gmail.com wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA512

 On Fri, Jun 5, 2009 at 3:33 PM, Vasili I. Galchin wrote:
  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

 You need to give more detail.

 For example, is your directory layout like
 './src/Swish/HaskellRDF.../foo.hs'? In that case, Cabal is looking for
 './Swish/HaskellRDF.../foo.hs'. You need to tell it to look in src/
 and not ./ with a line like 'hs-source-dirs: src/' etc.

 - --
 gwern
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)

 iEYEAREKAAYFAkopdUsACgkQvpDo5Pfl1oLbCgCfWI1MZOyWnsyAkra88S/LC506
 7oMAoJhv5hDcc1Ypqq0hLncB2t/1Yuby
 =ADOt
 -END PGP SIGNATURE-

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


Re: [Haskell-cafe] Cabal addressibility problem

2009-06-05 Thread Gwern Branwen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On Fri, Jun 5, 2009 at 4:10 PM, Vasili I. Galchin wrote:
 for directory structure I Swish-0.2.1/Swish/HaskellRDF and
 Swish-0.2.1/Swish/HaskellUtils  ... there are deeper directories but that
 distract from the discussion ... to make things concete:

 1) swish.cabal is directly under Swish-0.2.1

 2) GraphPartitionTest.hs is under Swish-0.2.1/Swish/HaskellRDF

 3) GraphPartitionTest's dependencies are either under HaskellRDF or
 HaskellUtils

 Hope this helps to make things clearer. I added a Hs-source-dirs but that
 help.

 I did a ruinhaskell Setup -? to check on options. I don't see any verbose
 mode so that when I do runhaskell Setup build I can moniitor the progress
 of my build for diagnostic purposes! Is there a verbose mode?

 Thanks,

 Vasili
[04:27 PM] 0Mb$ build --help
Usage: Setup build [FLAGS]

Flags for build:
 -h --help  Show this help text
 -v --verbose[=n]   Control verbosity (n is 0--3, default verbosity level
is 1)
--builddir=DIR  The directory where Cabal puts generated build files
(default dist)
--with-PROG=PATHgive the path to PROG
--PROG-options=OPTS give extra options to PROG
--PROG-option=OPT   give an extra option to PROG (no need to quote options
containing spaces)

- --
gwern
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAkopf/sACgkQvpDo5Pfl1oIZfgCeInjWOqdxejdpsBaI62YHkSHu
BvIAn1ZsC9rCYmluCW2UCmFGVFcAw3bh
=S6In
-END PGP SIGNATURE-
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal addressibility problem

2009-06-05 Thread Vasili I. Galchin
At work I am using Windose ... so I use runhaskell .. I don't have build


Vasili

On Fri, Jun 5, 2009 at 3:28 PM, Gwern Branwen gwe...@gmail.com wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA512

 On Fri, Jun 5, 2009 at 4:10 PM, Vasili I. Galchin wrote:
  for directory structure I Swish-0.2.1/Swish/HaskellRDF and
  Swish-0.2.1/Swish/HaskellUtils  ... there are deeper directories but that
  distract from the discussion ... to make things concete:
 
  1) swish.cabal is directly under Swish-0.2.1
 
  2) GraphPartitionTest.hs is under Swish-0.2.1/Swish/HaskellRDF
 
  3) GraphPartitionTest's dependencies are either under HaskellRDF or
  HaskellUtils
 
  Hope this helps to make things clearer. I added a Hs-source-dirs but
 that
  help.
 
  I did a ruinhaskell Setup -? to check on options. I don't see any
 verbose
  mode so that when I do runhaskell Setup build I can moniitor the
 progress
  of my build for diagnostic purposes! Is there a verbose mode?
 
  Thanks,
 
  Vasili
 [04:27 PM] 0Mb$ build --help
 Usage: Setup build [FLAGS]

 Flags for build:
  -h --help  Show this help text
  -v --verbose[=n]   Control verbosity (n is 0--3, default verbosity
 level
is 1)
--builddir=DIR  The directory where Cabal puts generated build files
(default dist)
--with-PROG=PATHgive the path to PROG
--PROG-options=OPTS give extra options to PROG
--PROG-option=OPT   give an extra option to PROG (no need to quote
 options
containing spaces)

 - --
 gwern
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)

 iEYEAREKAAYFAkopf/sACgkQvpDo5Pfl1oIZfgCeInjWOqdxejdpsBaI62YHkSHu
 BvIAn1ZsC9rCYmluCW2UCmFGVFcAw3bh
 =S6In
 -END PGP SIGNATURE-

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


Re: [Haskell-cafe] Cabal addressibility problem

2009-06-05 Thread Vasili I. Galchin
getting farther .

Executable GraphPartitionTest
   Hs-source-dirs: Swish/   added this
   Main-Is:HaskellRDF/GraphPartitionTest.hschanged to a real
filesystem path
   Other-modules:  HaskellRDF.GraphPartition
   HaskellRDF.GraphClass
   HaskellUtils.ListHelpers
   HaskellUtils.TestHelpers   now says can't find
module 'Swish.HaskellUtils.TestHelpers'???

Vasili


On Fri, Jun 5, 2009 at 3:28 PM, Gwern Branwen gwe...@gmail.com wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA512

 On Fri, Jun 5, 2009 at 4:10 PM, Vasili I. Galchin wrote:
  for directory structure I Swish-0.2.1/Swish/HaskellRDF and
  Swish-0.2.1/Swish/HaskellUtils  ... there are deeper directories but that
  distract from the discussion ... to make things concete:
 
  1) swish.cabal is directly under Swish-0.2.1
 
  2) GraphPartitionTest.hs is under Swish-0.2.1/Swish/HaskellRDF
 
  3) GraphPartitionTest's dependencies are either under HaskellRDF or
  HaskellUtils
 
  Hope this helps to make things clearer. I added a Hs-source-dirs but
 that
  help.
 
  I did a ruinhaskell Setup -? to check on options. I don't see any
 verbose
  mode so that when I do runhaskell Setup build I can moniitor the
 progress
  of my build for diagnostic purposes! Is there a verbose mode?
 
  Thanks,
 
  Vasili
 [04:27 PM] 0Mb$ build --help
 Usage: Setup build [FLAGS]

 Flags for build:
  -h --help  Show this help text
  -v --verbose[=n]   Control verbosity (n is 0--3, default verbosity
 level
is 1)
--builddir=DIR  The directory where Cabal puts generated build files
(default dist)
--with-PROG=PATHgive the path to PROG
--PROG-options=OPTS give extra options to PROG
--PROG-option=OPT   give an extra option to PROG (no need to quote
 options
containing spaces)

 - --
 gwern
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)

 iEYEAREKAAYFAkopf/sACgkQvpDo5Pfl1oIZfgCeInjWOqdxejdpsBaI62YHkSHu
 BvIAn1ZsC9rCYmluCW2UCmFGVFcAw3bh
 =S6In
 -END PGP SIGNATURE-

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


Re: [Haskell-cafe] Cabal addressibility problem

2009-06-05 Thread Gwern Branwen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On Fri, Jun 5, 2009 at 4:49 PM, Vasili I. Galchin wrote:
 getting farther .

 Executable GraphPartitionTest
Hs-source-dirs: Swish/  Main-Is:
 HaskellRDF/GraphPartitionTest.hsfilesystem path

Right. You understand why it has to be a filepath and not a module
name? Because the module name of an executable would be 'Main', not
HaskellRDF.GraphPartitionTest. You can try compiling something like

module Foo (main) where
main = print hello world

and see for yourself how it fails.

Other-modules:  HaskellRDF.GraphPartition
HaskellRDF.GraphClass
HaskellUtils.ListHelpers
HaskellUtils.TestHelpers   module 
 'Swish.HaskellUtils.TestHelpers'???

 Vasili

Right. hs-source-dirs defined all the module paths as relative to
Swish/; I think the solution here would be to have something like
'hs-source-dirs: ., Swish/'  (or whatever the directory was that the
HaskellUtils stuff can be found in if not ./).

- --
gwern
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAkophlwACgkQvpDo5Pfl1oJkBgCeLBI6CsOOdt4EzJa1CaYzoMd4
aDAAn3HICqcDAR74J7z4v8xkakVJ6bDl
=hgRy
-END PGP SIGNATURE-
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal addressibility problem

2009-06-05 Thread Ross Mellgren

If your module statements say Swish in them, e.g.

module Swish.HaskellUtils.TestHelpers where 

then you should probably have no hs-source-dirs (or hs-source-dirs: .)  
and then use Swish.HaskellUtils.TestHelpers.


But leave Main-Is: as you have it.

-Ross

On Jun 5, 2009, at 4:49 PM, Vasili I. Galchin wrote:


getting farther .

Executable GraphPartitionTest
   Hs-source-dirs: Swish/   added this
   Main-Is:HaskellRDF/GraphPartitionTest.hschanged to  
a real filesystem path

   Other-modules:  HaskellRDF.GraphPartition
   HaskellRDF.GraphClass
   HaskellUtils.ListHelpers
   HaskellUtils.TestHelpers   now says can't  
find module 'Swish.HaskellUtils.TestHelpers'???


Vasili


On Fri, Jun 5, 2009 at 3:28 PM, Gwern Branwen gwe...@gmail.com  
wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On Fri, Jun 5, 2009 at 4:10 PM, Vasili I. Galchin wrote:
 for directory structure I Swish-0.2.1/Swish/HaskellRDF and
 Swish-0.2.1/Swish/HaskellUtils  ... there are deeper directories  
but that

 distract from the discussion ... to make things concete:

 1) swish.cabal is directly under Swish-0.2.1

 2) GraphPartitionTest.hs is under Swish-0.2.1/Swish/HaskellRDF

 3) GraphPartitionTest's dependencies are either under HaskellRDF or
 HaskellUtils

 Hope this helps to make things clearer. I added a Hs-source-dirs  
but that

 help.

 I did a ruinhaskell Setup -? to check on options. I don't see  
any verbose
 mode so that when I do runhaskell Setup build I can moniitor the  
progress

 of my build for diagnostic purposes! Is there a verbose mode?

 Thanks,

 Vasili
[04:27 PM] 0Mb$ build --help
Usage: Setup build [FLAGS]

Flags for build:
 -h --help  Show this help text
 -v --verbose[=n]   Control verbosity (n is 0--3, default  
verbosity level

   is 1)
   --builddir=DIR  The directory where Cabal puts generated  
build files

   (default dist)
   --with-PROG=PATHgive the path to PROG
   --PROG-options=OPTS give extra options to PROG
   --PROG-option=OPT   give an extra option to PROG (no need to  
quote options

   containing spaces)

- --
gwern
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAkopf/sACgkQvpDo5Pfl1oIZfgCeInjWOqdxejdpsBaI62YHkSHu
BvIAn1ZsC9rCYmluCW2UCmFGVFcAw3bh
=S6In
-END PGP SIGNATURE-

___
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 Ryan Ingram
On this note, shouldn't there be cabal uninstall?

  -- ryan

On Wed, Jun 3, 2009 at 3:40 PM, Don Stewart d...@galois.com 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 ryani.s...@gmail.com 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


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

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

interactive: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 bri...@aracnet.com wrote:

From: brian bri...@aracnet.com
Subject: Re: [Haskell-cafe] Cabal/primes
To: michael rice nowg...@yahoo.com
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 nowg...@yahoo.com wrote:

From: michael rice nowg...@yahoo.com
Subject: Re: [Haskell-cafe] Cabal/primes
To: brian bri...@aracnet.com
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

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

interactive: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 bri...@aracnet.com wrote:

From: brian bri...@aracnet.com
Subject: Re: [Haskell-cafe] Cabal/primes
To: michael rice nowg...@yahoo.com
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 d...@galois.com wrote:

From: Don Stewart d...@galois.com
Subject: Re: [Haskell-cafe] Cabal/primes
To: michael rice nowg...@yahoo.com
Cc: brian bri...@aracnet.com, 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


[Haskell-cafe] Cabal/primes

2009-06-02 Thread michael rice
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?

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
Prelude Data.Numbers.Primes take 10 primes
Loading package syb ... linking ... done.
Loading package base-3.0.3.0 ... linking ... done.
Loading package primes-0.1.1 ... linking ... done.
[2,3,5,7,11,13,17,19,23,29]
Prelude Data.Numbers.Primes isPrime 7

interactive:1:0: Not in scope: `isPrime'
Prelude Data.Numbers.Primes 




  ___
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


[Haskell-cafe] cabal option to specify the ghc version?

2009-05-27 Thread Johannes Waldmann
Hi. How can I tell cabal (= the executable from cabal-install)
to use a specific ghc version (and not the one that's
currently linked to ghc)? - Thanks, J.W.



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


Re: [Haskell-cafe] cabal option to specify the ghc version?

2009-05-27 Thread David Menendez
On Wed, May 27, 2009 at 5:25 PM, Johannes Waldmann
waldm...@imn.htwk-leipzig.de wrote:
 Hi. How can I tell cabal (= the executable from cabal-install)
 to use a specific ghc version (and not the one that's
 currently linked to ghc)? - Thanks, J.W.

According to 
http://haskell.org/haskellwiki/Cabal/How_to_install_a_Cabal_package,
you would use the --with-compiler option.

-- 
Dave Menendez d...@zednenem.com
http://www.eyrie.org/~zednenem/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal option to specify the ghc version?

2009-05-27 Thread Henning Thielemann


On Wed, 27 May 2009, Johannes Waldmann wrote:


Hi. How can I tell cabal (= the executable from cabal-install)
to use a specific ghc version (and not the one that's
currently linked to ghc)? - Thanks, J.W.


cabal install --with-compiler=/usr/local/lib/ghc-6.4.2/whatknowi
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal, Time GHC 6.10.2

2009-05-24 Thread Dominic Steinitz
Duncan Coutts wrote:
 On Sun, 2009-05-17 at 09:17 +0100, Dominic Steinitz wrote:
 I get

 d...@linux-6ofq:~/asn1 runghc Setup.hs configure
 Configuring PER-0.0.20...
 Setup.hs: At least the following dependencies are missing:
 time -any  -any
 but I have time

 d...@linux-6ofq:~/asn1 ghc-pkg list | grep time
 old-locale-1.0.0.1, old-time-1.0.0.2, packedstring-0.1.0.1,
 time-1.1.2.4
 I think I can see why cabal isn't finding it:

 ghc-pkg dump --global | grep time-1.1.2.4
 finds nothing and I believe that is what cabal uses to find things.
 
 The default for runghc Setup.hs configure is --global, but the default
 for cabal configure is --user. So if you're using the cabal program
 to install packages, then you can also us it to configure other
 packages. If for you need to use the runghc Setup.hs interface (e.g. in
 some system build scripts) and you want it to pick up packages from the
 user package db then use the --user flag. If you're constantly having to
 use the runghc Setup.hs interface and doing per-user installs is a pain
 then you can set the default for the cabal program to be global installs
 in the cabal config file (~/.cabal/config).
 
 I'll add this issue to the FAQ, it come up enough. If anyone else
 reading would like to eliminate this FAQ, then implementing this ticket
 is the answer:
 
 suggest use of --user if configure fails with missing deps that
 are in the user db
 http://hackage.haskell.org/trac/hackage/ticket/384
 
 Duncan
 
 
 
Duncan,

Thanks very much. I'm happy to update the FAQ this weekend unless you
have already done it.

Dominic.

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


Re: [Haskell-cafe] Cabal, Time GHC 6.10.2

2009-05-24 Thread Duncan Coutts
On Sun, 2009-05-24 at 12:04 +0100, Dominic Steinitz wrote:

  I'll add this issue to the FAQ, it come up enough. If anyone else
  reading would like to eliminate this FAQ, then implementing this ticket
  is the answer:
  
  suggest use of --user if configure fails with missing deps that
  are in the user db
  http://hackage.haskell.org/trac/hackage/ticket/384
  

 Thanks very much. I'm happy to update the FAQ this weekend unless you
 have already done it.

Oh that'd be great. The Cabal website is managed as a darcs repo so
just:

darcs get http://haskell.org/cabal/

then edit the FAQ.markdown and run make to update the FAQ.html (uses
pandoc). Then darcs send the patches to me or the cabal-devel mailing
list.

Duncan

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


[Haskell-cafe] Cabal, Time GHC 6.10.2

2009-05-17 Thread Dominic Steinitz
I get

 d...@linux-6ofq:~/asn1 runghc Setup.hs configure
 Configuring PER-0.0.20...
 Setup.hs: At least the following dependencies are missing:
 time -any  -any

but I have time

 d...@linux-6ofq:~/asn1 ghc-pkg list | grep time
 old-locale-1.0.0.1, old-time-1.0.0.2, packedstring-0.1.0.1,
 time-1.1.2.4

I think I can see why cabal isn't finding it:

 ghc-pkg dump --global | grep time-1.1.2.4

finds nothing and I believe that is what cabal uses to find things.

What's not clear is what I do to fix things. Go back to 6.10.1?

Thanks, Dominic.

 d...@linux-6ofq:~/asn1 ghc --version
 The Glorious Glasgow Haskell Compilation System, version 6.10.2
 d...@linux-6ofq:~/asn1 ghc-pkg --version
 GHC package manager version 6.10.2

Here's my .cabal file.

 Name:PER
 Version: 0.0.20
 License: BSD3
 Author:  Dominic Steinitz
 Maintainer:  dominic.stein...@blueyonder.co.uk
 Copyright:   Dominic Steinitz 2003 - 2009
 Stability:   Alpha
 Category:Language
 Homepage:http://www.haskell.org/asn1
 Synopsis:ASN.1 PER support for Haskell
 Description: A formal and executable specification of the Packed Encoding 
 Rules (PER)
  for ASN.1
 build-depends:   binary-strict == 0.4.2,
  bytestring,
  mtl,
  containers,
  time,
  pretty,
  base
 build-type:  custom
 
 Exposed-Modules: Language.ASN1.PER.Integer
  Language.ASN1.PER.GenerateC
 
 Executable:  PERTest
 Main-Is: PERTest.hs

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


Re: [Haskell-cafe] Cabal, Time GHC 6.10.2

2009-05-17 Thread Duncan Coutts
On Sun, 2009-05-17 at 09:17 +0100, Dominic Steinitz wrote:
 I get
 
  d...@linux-6ofq:~/asn1 runghc Setup.hs configure
  Configuring PER-0.0.20...
  Setup.hs: At least the following dependencies are missing:
  time -any  -any
 
 but I have time
 
  d...@linux-6ofq:~/asn1 ghc-pkg list | grep time
  old-locale-1.0.0.1, old-time-1.0.0.2, packedstring-0.1.0.1,
  time-1.1.2.4
 
 I think I can see why cabal isn't finding it:
 
  ghc-pkg dump --global | grep time-1.1.2.4
 
 finds nothing and I believe that is what cabal uses to find things.

The default for runghc Setup.hs configure is --global, but the default
for cabal configure is --user. So if you're using the cabal program
to install packages, then you can also us it to configure other
packages. If for you need to use the runghc Setup.hs interface (e.g. in
some system build scripts) and you want it to pick up packages from the
user package db then use the --user flag. If you're constantly having to
use the runghc Setup.hs interface and doing per-user installs is a pain
then you can set the default for the cabal program to be global installs
in the cabal config file (~/.cabal/config).

I'll add this issue to the FAQ, it come up enough. If anyone else
reading would like to eliminate this FAQ, then implementing this ticket
is the answer:

suggest use of --user if configure fails with missing deps that
are in the user db
http://hackage.haskell.org/trac/hackage/ticket/384

Duncan

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


Re: [Haskell-cafe] cabal parse problems

2009-05-09 Thread Duncan Coutts
On Wed, 2009-05-06 at 19:37 -0500, Vasili I. Galchin wrote:
 are them some CLI switches I can enable in order to better determine
 what parse error is??

The problem is that we're using a parser that has no support for
producing parse errors (Text.ParserCombinators.ReadP). The only reason
we're using this parser is because it's the only one in the core
libraries. Packages like parsec cannot be used in Cabal because Cabal is
a core library and parsec is not.

For this reason we've been considering just copying another parser
module into Cabal so that we can have saner (and quicker) parsing.

 Kind regards, Vasili
 
 On Wed, May 6, 2009 at 6:12 PM, Vasili I. Galchin
 vigalc...@gmail.com wrote:
 sorrily nope, Brian ...

For what it's worth, Brian was right, you cannot have a trailing comma
in a list field. Perhaps there was an additional error in the file that
we could not see in the bit you posted.

Duncan

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


Re: [Haskell-cafe] cabal parse problems

2009-05-09 Thread Vasili I. Galchin
Thanks .. very interesting on the cabal parsers. I somehow got around my
problem ... forgot how though.

Vasili

On Sat, May 9, 2009 at 10:48 AM, Duncan Coutts
duncan.cou...@worc.ox.ac.ukwrote:

 On Wed, 2009-05-06 at 19:37 -0500, Vasili I. Galchin wrote:
  are them some CLI switches I can enable in order to better determine
  what parse error is??

 The problem is that we're using a parser that has no support for
 producing parse errors (Text.ParserCombinators.ReadP). The only reason
 we're using this parser is because it's the only one in the core
 libraries. Packages like parsec cannot be used in Cabal because Cabal is
 a core library and parsec is not.

 For this reason we've been considering just copying another parser
 module into Cabal so that we can have saner (and quicker) parsing.

  Kind regards, Vasili
 
  On Wed, May 6, 2009 at 6:12 PM, Vasili I. Galchin
  vigalc...@gmail.com wrote:
  sorrily nope, Brian ...

 For what it's worth, Brian was right, you cannot have a trailing comma
 in a list field. Perhaps there was an additional error in the file that
 we could not see in the bit you posted.

 Duncan


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


[Haskell-cafe] cabal parse problems

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

 I am trying to cabalize a package (swish .. semantic web) but am
running into parse error:
vigalc...@ubuntu:~/FTP/Haskell/Swish-0.2.1$ runhaskell Setup.hs configure
Setup.hs: swish.cabal:24: Parse of field 'exposed-modules' failed.
vigalc...@ubuntu:~/FTP/Haskell/Swish-0.2.1$


Below: is a fragment from my .cabal file. Line #24 starts with
Exposed-modules:
.
.
.
Data-Files:  README

Exposed-modules: Swish.HaskellRDF.BuiltInDatatypes,
 Swish.HaskellRDF.BuiltInMap,
 Swish.HaskellRDF.BuiltInMapTest,
 Swish.HaskellRDF.BuiltInRules,
 Swish.HaskellRDF.ClassRestrictionRule,
 Swish.HaskellRDF.ClassRestrictionRuleTest,
 Swish.HaskellRDF.Datatype,
 Swish.HaskellRDF.GraphClass,
 Swish.HaskellRDF.GraphMatch,

Any ideas why I am getting parse error? Pretty vague error message!

Kind regards,

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


Re: [Haskell-cafe] cabal parse problems

2009-05-06 Thread Vasili I. Galchin
sorrily nope, Brian ...

Vasili

On Wed, May 6, 2009 at 6:06 PM, br...@lorf.org wrote:

 On Wednesday, 06.05.09 at 18:05, Vasili I. Galchin wrote:
  Exposed-modules: Swish.HaskellRDF.BuiltInDatatypes,
  ...
   Swish.HaskellRDF.GraphMatch,

 Think it probably doesn't like that trailing comma.

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


Re: [Haskell-cafe] cabal parse problems

2009-05-06 Thread Daniel Fischer
Am Donnerstag 07 Mai 2009 01:05:40 schrieb Vasili I. Galchin:
 Hello,

  I am trying to cabalize a package (swish .. semantic web) but am
 running into parse error:
 vigalc...@ubuntu:~/FTP/Haskell/Swish-0.2.1$ runhaskell Setup.hs configure
 Setup.hs: swish.cabal:24: Parse of field 'exposed-modules' failed.
 vigalc...@ubuntu:~/FTP/Haskell/Swish-0.2.1$


 Below: is a fragment from my .cabal file. Line #24 starts with
 Exposed-modules:
 .
 .
 .
 Data-Files:  README

 Exposed-modules: Swish.HaskellRDF.BuiltInDatatypes,
  Swish.HaskellRDF.BuiltInMap,
  Swish.HaskellRDF.BuiltInMapTest,
  Swish.HaskellRDF.BuiltInRules,
  Swish.HaskellRDF.ClassRestrictionRule,
  Swish.HaskellRDF.ClassRestrictionRuleTest,
  Swish.HaskellRDF.Datatype,
  Swish.HaskellRDF.GraphClass,
  Swish.HaskellRDF.GraphMatch,

 Any ideas why I am getting parse error? Pretty vague error message!

Idea:

The syntax of the value depends on the field. Field types include:

token , filename , directory

Either a sequence of one or more non-space non-comma characters, or a 
quoted string in 
Haskell 98 lexical syntax. Unless otherwise stated, relative filenames and 
directories are 
interpreted from the package root directory.

Don't use commas.


 Kind regards,

 Vasili

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


Re: [Haskell-cafe] cabal parse problems

2009-05-06 Thread Vasili I. Galchin
are them some CLI switches I can enable in order to better determine what
parse error is??

Kind regards, Vasili

On Wed, May 6, 2009 at 6:12 PM, Vasili I. Galchin vigalc...@gmail.comwrote:

 sorrily nope, Brian ...

 Vasili


 On Wed, May 6, 2009 at 6:06 PM, br...@lorf.org wrote:

 On Wednesday, 06.05.09 at 18:05, Vasili I. Galchin wrote:
  Exposed-modules: Swish.HaskellRDF.BuiltInDatatypes,
  ...
   Swish.HaskellRDF.GraphMatch,

 Think it probably doesn't like that trailing comma.



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


Re: [Haskell-cafe] cabal parse problems

2009-05-06 Thread Vasili I. Galchin
I figured out myself ... even though the parse was allegedly was on line #24
.. it was below because I used as a separator '/' instead of '.'!

Kind regards, Vasili


On Wed, May 6, 2009 at 7:37 PM, Vasili I. Galchin vigalc...@gmail.comwrote:

 are them some CLI switches I can enable in order to better determine what
 parse error is??

 Kind regards, Vasili


 On Wed, May 6, 2009 at 6:12 PM, Vasili I. Galchin vigalc...@gmail.comwrote:

 sorrily nope, Brian ...

 Vasili


 On Wed, May 6, 2009 at 6:06 PM, br...@lorf.org wrote:

 On Wednesday, 06.05.09 at 18:05, Vasili I. Galchin wrote:
  Exposed-modules: Swish.HaskellRDF.BuiltInDatatypes,
  ...
   Swish.HaskellRDF.GraphMatch,

 Think it probably doesn't like that trailing comma.




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


Re: [Haskell-cafe] Cabal and WinHugs

2009-04-16 Thread Duncan Coutts
On Sun, 2009-04-12 at 20:02 -0700, Iavor Diatchki wrote:
 Hello,
 What is the preferred way to install a cabal package so that it works
 with winhugs?  When I tried cabal install --user --hugs I got an
 error that it could not find hugsffi.  I managed to get things
 working by manually downloading the package, and extracting the
 appropriate source directories to the packages folder of winhugs
 (i.e., basically skipping cabal) but this is kind of clunky. So to
 summarize, here are my two questions:
   1. Am I doing something wrong, or does cabal not support WinHugs?, and
   2. Does WinHugs have a user specific packages folder (so that each
 user can have their own set of packages)?

I've never tried with winhugs and to be honest we don't test much with
hugs either. Don't take that as a discouragement though, it'd be great
to have better support for hugs and winhugs in the cabal tool. All it
needs is someone to pay it a little attention.

For the specific issue, does winhugs come with the hugsffi tool? I
expect that it should do though perhaps it's hidden away in some
directory.

I believe that by default hugs uses $HOME/lib/packages/* for per-user
packages. I'm not quite sure what winhugs does. It'd be good to adjust
the defaults to make this just work.

Duncan

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


[Haskell-cafe] cabal install vs. profiling

2009-04-15 Thread David F. Place
Hi,

Suppose I have installed a number of libraries and have written a
program using them.  Now, I want to profile my program.  What is the
best way to get the profiling versions of the libraries installed?

Thanks,
David

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


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

2009-04-15 Thread Gwern Branwen

On Wed, Apr 15, 2009 at 11:21 AM, David F. Place d...@vidplace.com wrote:

Hi,

Suppose I have installed a number of libraries and have written a
program using them.  Now, I want to profile my program.  What is the
best way to get the profiling versions of the libraries installed?

Thanks,
David


I'd chuck 'library-profiling: True' into my .cabal/config, and do 'cabal install 
--reinstall list of libraries' (being careful to exclude the core libraries 
like unix and process).

--
gwern

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 haddock and Paths_Xxx

2009-04-06 Thread Martijn van Steenbergen

Hello,

cabal generates a Paths_Xxx file for me which I import and use, but 
cabal haddock doesn't seem to like it much.


If I don't specify the generated module at all in my cabal file, cabal 
haddock generates visible documentation for the module, which is not 
what I want: the module should stay internal.


If I specify it in either Exposed-Modules or Other-Modules, 'cabal 
configure; cabal haddock' fails with:



cabal: can't find source for Paths_Xxx in ., dist/build/autogen


While 'cabal configure; cabal build; cabal haddock' fails with:


cabal: can't find source for module Paths_Xxx


Can I have the best of both, i.e. generate docs without problems and use 
the generated module?


Thanks,

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


[Haskell-cafe] cabal build on mac os 10.5.6 , can't find gmp

2009-04-05 Thread brian

Hi,

Cabal won't build zlib because it can't find libgmp.

It's there, in /sw/lib (fink installation).

I've modified the bootstrap script and added -L/sw/lib to the ghc  
options.  This is a mystery in itself because ghc is itself a fink  
package and should know where gmp is, so that's already a bad sign.


I can get to the build step with the additional -L option but then ./ 
Setup fails again because it can't find gmp.


Help   ?

Thanks,

Brian

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


[Haskell-cafe] Cabal properties with conditionals

2009-03-21 Thread Manlio Perillo

Hi.

Assuming this configuration fragment:

library xxx
cc-options: -Wall

if flag(HAVE_URANDOM)
cc-options:-DHAVE_URANDOM

In case the HAVE_URANDOM flag is defined, what will be the value of the 
used cc-options?

1) -DHAHE_URANDOM
2) -Wall -DHAHE_URANDOM


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


Re: [Haskell-cafe] Cabal properties with conditionals

2009-03-21 Thread Duncan Coutts
On Sat, 2009-03-21 at 14:26 +0100, Manlio Perillo wrote:
 Hi.
 
 Assuming this configuration fragment:
 
 library xxx
  cc-options: -Wall
 
  if flag(HAVE_URANDOM)
  cc-options:-DHAVE_URANDOM
 
 In case the HAVE_URANDOM flag is defined, what will be the value of the 
 used cc-options?
 1) -DHAHE_URANDOM
 2) -Wall -DHAHE_URANDOM

The latter. Try it.

In general all fields get `mappend`ed which for list-like fields means
appending. For single value fields like True/False then latter fields
win.

Duncan

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


Re: [Haskell-cafe] Cabal properties with conditionals

2009-03-21 Thread Manlio Perillo

Duncan Coutts ha scritto:

On Sat, 2009-03-21 at 14:26 +0100, Manlio Perillo wrote:

Hi.

Assuming this configuration fragment:

library xxx
 cc-options: -Wall

 if flag(HAVE_URANDOM)
 cc-options:-DHAVE_URANDOM

In case the HAVE_URANDOM flag is defined, what will be the value of the 
used cc-options?

1) -DHAHE_URANDOM
2) -Wall -DHAHE_URANDOM


The latter. Try it.

In general all fields get `mappend`ed which for list-like fields means
appending. For single value fields like True/False then latter fields
win.



Ok, thanks.


P.S: I tried to send an email to cabal-devel some days ago, with a 
feature I would like to see in Cabal.

But the mail was never posted to the mailing list.
Is that list moderated?
Should I simply fill a ticket?



Duncan




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


Re: [Haskell-cafe] Cabal properties with conditionals

2009-03-21 Thread Duncan Coutts
On Sat, 2009-03-21 at 23:05 +0100, Manlio Perillo wrote:

 P.S: I tried to send an email to cabal-devel some days ago, with a 
 feature I would like to see in Cabal.
 But the mail was never posted to the mailing list.
 Is that list moderated?

It's subscriber only, like all the haskell.org mailing lists. We got too
much spam otherwise. :-(

 Should I simply fill a ticket?

Yes, thanks very much.

Duncan

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


Re: [Haskell-cafe] Cabal properties with conditionals

2009-03-21 Thread Manlio Perillo

Duncan Coutts ha scritto:

On Sat, 2009-03-21 at 23:05 +0100, Manlio Perillo wrote:

P.S: I tried to send an email to cabal-devel some days ago, with a 
feature I would like to see in Cabal.

But the mail was never posted to the mailing list.
Is that list moderated?


It's subscriber only, like all the haskell.org mailing lists. We got too
much spam otherwise. :-(



But I did subscribed!


Should I simply fill a ticket?


Yes, thanks very much.



Ok.

I posted some details in this thread:
http://www.haskell.org/pipermail/haskell-cafe/2009-March/057923.html


Duncan




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


Re: [Haskell-cafe] Cabal properties with conditionals

2009-03-21 Thread Duncan Coutts
On Sun, 2009-03-22 at 01:03 +0100, Manlio Perillo wrote:
 Duncan Coutts ha scritto:
  On Sat, 2009-03-21 at 23:05 +0100, Manlio Perillo wrote:
  
  P.S: I tried to send an email to cabal-devel some days ago, with a 
  feature I would like to see in Cabal.
  But the mail was never posted to the mailing list.
  Is that list moderated?
  
  It's subscriber only, like all the haskell.org mailing lists. We got too
  much spam otherwise. :-(
  
 
 But I did subscribed!

Oh, then it should just work. There's nothing stuck in the moderation
queue, I've checked (the only things that get moderated are posts from
subscribers with very large attachments).

  Should I simply fill a ticket?
  
  Yes, thanks very much.

 Ok.
 
 I posted some details in this thread:
 http://www.haskell.org/pipermail/haskell-cafe/2009-March/057923.html

Ok, great. A feature request ticket about that would be good.


Duncan

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


[Haskell-cafe] Cabal and package changelog

2009-03-08 Thread Manlio Perillo

Hi.

The Cabal package description includes a property `license-file`.
This property may be used by Hackage to provide a link to the license file.

However I would like to have a `changelog-file`, too.
So that from Hackage I can quickly check what's changed with the new 
version of a package.



Is this feasible?


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


Re: [Haskell-cafe] cabal-install 0.6.2 does not bootstrap with ghc-6.10.1 debian distribution

2009-03-08 Thread Duncan Coutts
On Sat, 2009-03-07 at 17:51 -0800, Ahn, Ki Yung wrote:
 Dear Haskellers and especially who are working on cabal-install
 and debian packaging,
 
 I sometimes clean up .ghc and .cabal in my home directory to start from
 scratch because of dependency loopholes (cabal-install does not have
 remove option yet, so it's hard to fix when such loophole happens).
 
 Today, I had some time in the airport and decided to start from scratch
 again because of the dependency loophole with process 1.0.1.1 and
 haddock.  I downloaded the most recent version of cabal-install the
 version 0.6.2, and found out that the ./bootstrap.sh does not work.

If you could provide any details on how it does not work that would be
much appreciated. Eg a log of the output from running the bootstrap.

Duncan

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


Re: [Haskell-cafe] cabal-install 0.6.2 does not bootstrap with ghc-6.10.1 debian distribution

2009-03-08 Thread Jochem Berndsen
Ahn, Ki Yung wrote:
 If anyone who are not using debian distribution ghc-6.10.1 (e.g.,
 general linux binary ghc-6.10.1 or source compiled one) can try
 bootstrapping cabal-install 0.6.2 from scratch also finds the same
 problem, I think someone should make a ticket for cabal-install.

I remember having to install zlib1g-dev using the package manager,

   aptitude install zlib1g-dev

should suffice. If this was not the problem, please post the exact error
message so we can figure out what's going wrong.

Regards,

-- 
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal and package changelog

2009-03-08 Thread Gwern Branwen
On Sun, Mar 8, 2009 at 7:13 AM, Manlio Perillo manlio_peri...@libero.it wrote:
 Hi.

 The Cabal package description includes a property `license-file`.
 This property may be used by Hackage to provide a link to the license file.

 However I would like to have a `changelog-file`, too.
 So that from Hackage I can quickly check what's changed with the new version
 of a package.


 Is this feasible?


 Thanks  Manlio Perillo

http://hackage.haskell.org/trac/hackage/ticket/244
http://hackage.haskell.org/trac/hackage/ticket/299

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


Re: [Haskell-cafe] Cabal and package changelog

2009-03-08 Thread Duncan Coutts
On Sun, 2009-03-08 at 10:00 -0400, Gwern Branwen wrote:
 On Sun, Mar 8, 2009 at 7:13 AM, Manlio Perillo manlio_peri...@libero.it 
 wrote:
  Hi.
 
  The Cabal package description includes a property `license-file`.
  This property may be used by Hackage to provide a link to the license file.
 
  However I would like to have a `changelog-file`, too.
  So that from Hackage I can quickly check what's changed with the new version
  of a package.
 
 
  Is this feasible?
 
 
  Thanks  Manlio Perillo
 
 http://hackage.haskell.org/trac/hackage/ticket/244
 http://hackage.haskell.org/trac/hackage/ticket/299

Thanks Gwern. Yes, we're looking for a volunteer to work on implementing
this. 

One question is what the changelog format should be? Or should it just
be uninterpreted text? One suggestion was for Hackage and the RSS feed
to display the diff between the current and previous version of the
changelog. Or perhaps we can do both, diff it and parse the result as
haddock markup or something.

So suggestions and volunteers welcome.

Duncan

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


Re: [Haskell-cafe] Cabal and package changelog

2009-03-08 Thread Manlio Perillo

Duncan Coutts ha scritto:

On Sun, 2009-03-08 at 10:00 -0400, Gwern Branwen wrote:

On Sun, Mar 8, 2009 at 7:13 AM, Manlio Perillo manlio_peri...@libero.it wrote:

Hi.

The Cabal package description includes a property `license-file`.
This property may be used by Hackage to provide a link to the license file.

However I would like to have a `changelog-file`, too.
So that from Hackage I can quickly check what's changed with the new version
of a package.


Is this feasible?


Thanks  Manlio Perillo

http://hackage.haskell.org/trac/hackage/ticket/244
http://hackage.haskell.org/trac/hackage/ticket/299


Thanks Gwern. Yes, we're looking for a volunteer to work on implementing
this. 


One question is what the changelog format should be? Or should it just
be uninterpreted text? One suggestion was for Hackage and the RSS feed
to display the diff between the current and previous version of the
changelog. Or perhaps we can do both, diff it and parse the result as
haddock markup or something.



Personally, I find a format like:
http://divmod.org/trac/browser/trunk/Nevow/NEWS.txt

simple, compact and flexible.


GNU Changelog format is probably an overkill, since nowadays we have 
good revision control systems.



However GNU Changelog format *may* be supported (perhaps the changelog 
format can be specified in a Cabal property).



So suggestions and volunteers welcome.

Duncan




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


Re: [Haskell-cafe] cabal-install 0.6.2 does not bootstrap with ghc-6.10.1 debian distribution

2009-03-08 Thread Ahn, Ki Yung
Duncan Coutts 쓴 글:
 On Sat, 2009-03-07 at 17:51 -0800, Ahn, Ki Yung wrote:
 Dear Haskellers and especially who are working on cabal-install
 and debian packaging,

 I sometimes clean up .ghc and .cabal in my home directory to start from
 scratch because of dependency loopholes (cabal-install does not have
 remove option yet, so it's hard to fix when such loophole happens).

 Today, I had some time in the airport and decided to start from scratch
 again because of the dependency loophole with process 1.0.1.1 and
 haddock.  I downloaded the most recent version of cabal-install the
 version 0.6.2, and found out that the ./bootstrap.sh does not work.
 
 If you could provide any details on how it does not work that would be
 much appreciated. Eg a log of the output from running the bootstrap.
 
 Duncan
 

I am using Debian unstable.

The version of GHC debian package is 6.10.1+dfsg1-13,
and installed Haskell libraries (debian packages) are:

kya...@kyavaio:~$ ghc-pkg list
/usr/lib/ghc-6.10.1/./package.conf:
Cabal-1.6.0.1, Diff-0.1.2, HGL-3.2.0.0, HUnit-1.2.0.3,
QuickCheck-2.1.0.1, Stream-0.2.2, X11-1.4.5, array-0.2.0.0,
arrows-0.4.1, base-3.0.3.0, base-4.0.0.0, binary-0.5,
bytestring-0.9.1.4, cairo-0.10.0, cgi-3001.1.7.1,
containers-0.2.0.0, directory-1.0.0.2, editline-0.2.1.0,
fgl-5.4.2.2, filepath-1.1.0.1, gconf-0.10.0, (ghc-6.10.1),
ghc-prim-0.1.0.0, gio-0.10.0, glade-0.10.0, glib-0.10.0,
gnomevfs-0.10.0, gstreamer-0.10.0, gtk-0.10.0, gtkglext-0.10.0,
gtksourceview2-0.10.0, haskell98-1.0.1.0, hpc-0.5.0.2,
html-1.0.1.2, integer-0.1.0.0, irc-0.4.3, mtl-1.1.0.2,
network-2.2.0.1, old-locale-1.0.0.1, old-time-1.0.0.1,
packedstring-0.1.0.1, parallel-1.1.0.0, parsec-3.0.0,
pretty-1.0.1.0, process-1.0.1.0, random-1.0.0.1, rts-1.0,
stm-2.1.1.2, svgcairo-0.10.0, syb-0.1.0.0, syb-with-class-0.5.1,
tagsoup-0.6, template-haskell-2.3.0.0, time-1.1.2.3, unix-2.3.1.0,
utf8-string-0.3.4, xhtml-3000.2.0.1


Bootstrap fails like this:

kya...@kyavaio:~/tmp/cabal-install-0.6.2$ sh bootstrap.sh
Checking installed packages for ghc-6.10.1...

The Haskell package 'parsec' is required but it is not installed.
If you are using a ghc package provided by your operating system
then install the corresponding packages for 'parsec' and 'network'.
If you built ghc from source with only the core libraries then you
should install these extra packages. You can get them from hackage.

Error during cabal-install bootstrap:
The Haskell package 'parsec' is required but it is not installed.



P.S. Note, parsec and network are installed in the system using debian
distribution packages.

--
  Ahn, Ki Yung

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


Re: [Haskell-cafe] cabal-install 0.6.2 does not bootstrap with ghc-6.10.1 debian distribution

2009-03-08 Thread Duncan Coutts
On Sun, 2009-03-08 at 15:33 -0700, Ahn, Ki Yung wrote:

 I am using Debian unstable.
 
 The version of GHC debian package is 6.10.1+dfsg1-13,
 and installed Haskell libraries (debian packages) are:
 
 kya...@kyavaio:~$ ghc-pkg list
 /usr/lib/ghc-6.10.1/./package.conf:

 packedstring-0.1.0.1, parallel-1.1.0.0, parsec-3.0.0,

 Bootstrap fails like this:
 
 kya...@kyavaio:~/tmp/cabal-install-0.6.2$ sh bootstrap.sh
 Checking installed packages for ghc-6.10.1...
 
 The Haskell package 'parsec' is required but it is not installed.
 If you are using a ghc package provided by your operating system
 then install the corresponding packages for 'parsec' and 'network'.
 If you built ghc from source with only the core libraries then you
 should install these extra packages. You can get them from hackage.
 
 Error during cabal-install bootstrap:
 The Haskell package 'parsec' is required but it is not installed.

What it doesn't say is that it's looking for parsec version 2.

 P.S. Note, parsec and network are installed in the system using debian
 distribution packages.

For some reason the debian package maintainers decided to build
everything against parsec 3 rather than parsec 2 which everyone else is
using. Personally I think this was not a wise decision. Indeed it may be
a problem when it comes to supporting the Haskell platform because the
first version will use parsec 2. Any major parsec version transition in
the Haskell platform will be made by a community decision process.

What I've done is dropped the check for parsec in the bootstrap.sh. The
only reason we're looking for parsec is because it's needed by network
which we also need. So it's not strictly necessary that we check for it.

Duncan

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


Re: [Haskell-cafe] Cabal and package changelog

2009-03-08 Thread wren ng thornton

Manlio Perillo wrote:

Duncan Coutts ha scritto:
 On Sun, 2009-03-08 at 10:00 -0400, Gwern Branwen wrote:
  http://hackage.haskell.org/trac/hackage/ticket/244
  http://hackage.haskell.org/trac/hackage/ticket/299

 Thanks Gwern. Yes, we're looking for a volunteer to work on implementing
 this.
 One question is what the changelog format should be? Or should it just
 be uninterpreted text? One suggestion was for Hackage and the RSS feed
 to display the diff between the current and previous version of the
 changelog. Or perhaps we can do both, diff it and parse the result as
 haddock markup or something.

Personally, I find a format like:
http://divmod.org/trac/browser/trunk/Nevow/NEWS.txt
simple, compact and flexible.


Nice, simple, and to the point. It reminds me a lot of (a stripped down 
version of) YAML. If we invent a new format, using YAML as the syntax 
would make it easy to manipulate since there are already tools and 
libraries out there for that.



GNU Changelog format is probably an overkill, since nowadays we have 
good revision control systems.


However GNU Changelog format *may* be supported (perhaps the changelog 
format can be specified in a Cabal property).


Like YAML, GNU Changelog has enough history to have a large suite of 
tools for manipulating the format. It's a bit heavy-handed in this day 
and age, but many VCSes can generate it automatically.




As a developer, one of my criteria would be to keep it as lightweight as 
possible (though more formal than raw text). The more work changelogs 
take, the less likely they are to be maintained/accurate.


As a UI issue, I would amend the proposal in ticket #244. Because of the 
way Darcs works around tag boundaries, I've often been lax about tagging 
more frequently than major versions. It'd be nicer to open up the 
pending changelog amendment in $EDITOR so people can adjust it before 
publishing the sdist. (Perhaps with a flag to enable/disable this 
behavior for people who want more automated setups.)


Also helpful would be a command to inject things into the changelog from 
outside the VCS, at times other than when publishing. This is helpful 
for when you realize a version control message omitted details about 
changes, but you can't change the patch, and you don't want to forget 
the details between now and when publishing the new sdist to Hackage. 
Essentially this means the tools should have a pending file for the 
changelog which can be freely modified outside of the system (with some 
in-system tracking so that importing the VCS log and editing it does the 
right thing when trying to import the VCS log again later).


Actually, just having a tool to amend the pending file could be enough. 
Most VCSes have hooks for being able to run things before or after 
committing a patch. Thus, just have a tutorial on setting up the common 
VCSes to commit the same message to the changelog as to the version control.


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


[Haskell-cafe] cabal-install 0.6.2 does not bootstrap with ghc-6.10.1 debian distribution

2009-03-07 Thread Ahn, Ki Yung
Dear Haskellers and especially who are working on cabal-install
and debian packaging,

I sometimes clean up .ghc and .cabal in my home directory to start from
scratch because of dependency loopholes (cabal-install does not have
remove option yet, so it's hard to fix when such loophole happens).

Today, I had some time in the airport and decided to start from scratch
again because of the dependency loophole with process 1.0.1.1 and
haddock.  I downloaded the most recent version of cabal-install the
version 0.6.2, and found out that the ./bootstrap.sh does not work. So,
I had to bootstrap from version 0.6.2 and do cabal update and cabal
upgrade cabal-install to upgrade to 0.6.2.

I am not sure whether this is a cabal-install problem or debian
dstribution ghc-6.10.1 packaging probelm, since I have not tried to test
 this with any other ghc-6.10.1 distribution.

If anyone who are not using debian distribution ghc-6.10.1 (e.g.,
general linux binary ghc-6.10.1 or source compiled one) can try
bootstrapping cabal-install 0.6.2 from scratch also finds the same
problem, I think someone should make a ticket for cabal-install.

Thanks,

Ahn, Ki Yung

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


Re: [Haskell-cafe] Cabal and `main-is` field

2009-03-02 Thread Denis Bueno
On Sun, Mar 1, 2009 at 11:56, Duncan Coutts duncan.cou...@worc.ox.ac.uk wrote:
 That's because it's a bug, not a feature. :-)

 Be careful of using this feature as we might fix it.

I've wished for this feature, and have Cabal files right now that
would be cleaner with it.  Is there something technically wrong or
undesirable about this feature that necessitates fixing?

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


Re: [Haskell-cafe] Cabal and `main-is` field

2009-03-02 Thread Duncan Coutts
On Mon, 2009-03-02 at 07:15 -0700, Denis Bueno wrote:
 On Sun, Mar 1, 2009 at 11:56, Duncan Coutts duncan.cou...@worc.ox.ac.uk 
 wrote:
  That's because it's a bug, not a feature. :-)
 
  Be careful of using this feature as we might fix it.
 
 I've wished for this feature, and have Cabal files right now that
 would be cleaner with it.  Is there something technically wrong or
 undesirable about this feature that necessitates fixing?

If it's supposed to work it should work consistently. It's a quirk that
to support old-style .cabal files we allow build-depends but not other
fields in the global section. If we do it properly we should either
allow all fields there, or perhaps in an explicit common section or
something.

I hope we can address this and related limitations and quirks in the
Cabal-1.8 development cycle. If you want to help out with that let me
know and I can give you some pointers.

Duncan

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


[Haskell-cafe] Cabal and `main-is` field

2009-03-01 Thread Manlio Perillo

Hi.

I have started to use Cabal for a small project where I have to build 
several executables.


The project layout is something like this:

/
  bin/
a.hs
b.hs
  src/
X.hs
Y.hs


The Cabal configuration file is something like:

executable a
build-depends: haskell98, base, ...

main-is:   a.hs
hs-source-dirs:src bin
other-modules: X

This is perfectly reasonable, but it is odd, IMHO.

I don't understand why `main-is` is relative to `hs-source-dirs`.
What is the rationale?
After all, there is only one executable that can be specified in the 
`executable` block.


The configuration file should be, instead (IMHO, of course):

executable a
build-depends: haskell98, base, ...

main-is:   bin/a.hs
hs-source-dirs:src
other-modules: X


Another problem I have noted, is that if I specify `main-is` field two 
times, no error is reported.

Simply, Cabal uses the last directive.



One last thing: is it possible to define macros in Cabal?
In my package, I have n executables, that have many dependencies in common.
I would like to avoid having to repeat the same dependencies for each 
executable block.




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


Re: [Haskell-cafe] Cabal and `main-is` field

2009-03-01 Thread Gwern Branwen

On Sun, Mar 1, 2009 at 10:45 AM, Manlio Perillo manlio_peri...@libero.it 
wrote:

Hi.

...

One last thing: is it possible to define macros in Cabal?
In my package, I have n executables, that have many dependencies in common.
I would like to avoid having to repeat the same dependencies for each
executable block.



Thanks   Manlio Perillo


You can hoist the common build-depends out of the executable stanzas. ie. from 
xmonad-utils.cabal:

build-depends:  base4, X11=1.3, ghc=6.8, unix, random=1.0
...
executable: hxsel
main-is:Hxsel.hs
hs-source-dirs: src
ghc-options:-funbox-strict-fields -Wall
ghc-prof-options:   -prof -auto-all

executable: hxput
main-is:Hxput.hs
hs-source-dirs: src
ghc-options:-funbox-strict-fields -Wall
ghc-prof-options:   -prof -auto-all


Notice that though hxput and hxsel need the packages in the top-level 
build-depends, they don't need to declare it.

--
gwern

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


Re: [Haskell-cafe] Cabal and `main-is` field

2009-03-01 Thread Manlio Perillo

Gwern Branwen ha scritto:

[...]

You can hoist the common build-depends out of the executable stanzas. 
ie. from xmonad-utils.cabal:


build-depends:  base4, X11=1.3, ghc=6.8, unix, random=1.0
...
executable: hxsel
main-is:Hxsel.hs
hs-source-dirs: src
ghc-options:-funbox-strict-fields -Wall
ghc-prof-options:   -prof -auto-all

executable: hxput
main-is:Hxput.hs
hs-source-dirs: src
ghc-options:-funbox-strict-fields -Wall
ghc-prof-options:   -prof -auto-all


Notice that though hxput and hxsel need the packages in the top-level 
build-depends, they don't need to declare it.




Thanks.
From documentation it was not clear this feature.

However, what happens if hxput add a build-depends field?
Will this override the global field?



Manlio Perillo

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


Re: [Haskell-cafe] Cabal and `main-is` field

2009-03-01 Thread Gwern Branwen

On Sun, Mar 1, 2009 at 12:10 PM, Manlio Perillo manlio_peri...@libero.it 
wrote:

Gwern Branwen ha scritto:


[...]

You can hoist the common build-depends out of the executable stanzas. ie.
from xmonad-utils.cabal:

build-depends:      base4, X11=1.3, ghc=6.8, unix, random=1.0
...
executable:         hxsel
main-is:            Hxsel.hs
hs-source-dirs:     src
ghc-options:        -funbox-strict-fields -Wall
ghc-prof-options:   -prof -auto-all

executable:         hxput
main-is:            Hxput.hs
hs-source-dirs:     src
ghc-options:        -funbox-strict-fields -Wall
ghc-prof-options:   -prof -auto-all


Notice that though hxput and hxsel need the packages in the top-level
build-depends, they don't need to declare it.



Thanks.
From documentation it was not clear this feature.

However, what happens if hxput add a build-depends field?
Will this override the global field?



Manlio Perillo


It doesn't override, but adds to. If the toplevel declares 'base', and then 
hxput does 'build-depends: random', hxput will be built against 'base, random'.

--
gwern

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


Re: [Haskell-cafe] Cabal and `main-is` field

2009-03-01 Thread Duncan Coutts
On Sun, 2009-03-01 at 18:10 +0100, Manlio Perillo wrote:
 Gwern Branwen ha scritto:
  [...]
  
  You can hoist the common build-depends out of the executable stanzas. 
  ie. from xmonad-utils.cabal:
  
  build-depends:  base4, X11=1.3, ghc=6.8, unix, random=1.0
  ...
  executable: hxsel
  main-is:Hxsel.hs
  hs-source-dirs: src
  ghc-options:-funbox-strict-fields -Wall
  ghc-prof-options:   -prof -auto-all
  
  executable: hxput
  main-is:Hxput.hs
  hs-source-dirs: src
  ghc-options:-funbox-strict-fields -Wall
  ghc-prof-options:   -prof -auto-all
  
  
  Notice that though hxput and hxsel need the packages in the top-level 
  build-depends, they don't need to declare it.
  
 
 Thanks.
  From documentation it was not clear this feature.

That's because it's a bug, not a feature. :-)

Be careful of using this feature as we might fix it.

Duncan

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


Re: [Haskell-cafe] Cabal and `main-is` field

2009-03-01 Thread Manlio Perillo

Duncan Coutts ha scritto:
 [...]


Notice that though hxput and hxsel need the packages in the top-level 
build-depends, they don't need to declare it.



Thanks.
 From documentation it was not clear this feature.


That's because it's a bug, not a feature. :-)

Be careful of using this feature as we might fix it.




Thanks, I was going to fix my Cabal configuration right now!


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


[Haskell-cafe] Cabal package bug?

2009-02-26 Thread jpaulo

hello all,

I've used cabal to install package haskell-src-1.0.1.3 under ghc 6.10.1;

Apparently, it worked fine!

However, function parseModule has been given the type:

parseModule ::
  String
  - ParseResult haskell-src-1.0.1.3:Language.Haskell.Syntax.HsModule

instead of simply

parseModule ::
  String
  - ParseResult HsModule

as described in the Language.Haskell.Parser module;

This causes conflicting types for all my other modules!


Can anyone please help me on this?

Any help would be very much appreciated!

bests,
joao

--
João Paulo Fernandes
Departamento de Informática
Universidade do Minho
www.di.uminho.pt/~jpaulo

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


[Haskell-cafe] Cabal haskell-src-1.0.1.3 package bug?

2009-02-26 Thread jpaulo


[now with the name of the package on subject; appologies for multiple emails]

hello all,

I've used cabal to install package haskell-src-1.0.1.3 under ghc 6.10.1;

Apparently, it worked fine!

However, function parseModule has been given the type:

parseModule ::
  String
  - ParseResult haskell-src-1.0.1.3:Language.Haskell.Syntax.HsModule

instead of simply

parseModule ::
  String
  - ParseResult HsModule

as described in the Language.Haskell.Parser module;

This causes conflicting types for all my other modules!


Can anyone please help me on this?

Any help would be very much appreciated!

bests,
joao

--
João Paulo Fernandes
Departamento de Informática
Universidade do Minho
www.di.uminho.pt/~jpaulo

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


Re: [Haskell-cafe] Cabal package bug?

2009-02-26 Thread Duncan Coutts
On Thu, 2009-02-26 at 08:00 +, jpa...@di.uminho.pt wrote:
 hello all,
 
 I've used cabal to install package haskell-src-1.0.1.3 under ghc 6.10.1;
 
 Apparently, it worked fine!
 
 However, function parseModule has been given the type:
 
 parseModule ::
String
- ParseResult haskell-src-1.0.1.3:Language.Haskell.Syntax.HsModule
 
 instead of simply
 
 parseModule ::
String
- ParseResult HsModule
 
 as described in the Language.Haskell.Parser module;
 
 This causes conflicting types for all my other modules!

This is the diamond dependency problem

http://blog.well-typed.com/2008/04/the-dreaded-diamond-dependency-problem/

 Can anyone please help me on this?

Most likely you've got two versions of haskell-src installed and some
packages are built against one version and some built against another.
GHC is showing you the fully qualified name here exactly because it
would otherwise refer to a different version.

So here's the thing, cabal-install makes sure that whatever you install
is self-consistent (no conflicting deps). So when you did
$ cabal install haskell-src
and it installed haskell-src-1.0.1.3, it made sure that the deps of that
package were consistent. That *does not* mean that it's dependencies are
consistent with every other package you've got installed. It does not
guarantee global consistency. Only local consistency of the thing you
asked to install.

So what could you do. Well if you were using a .cabal file for your own
program then cabal install on that would also guarantee consistency for
the dependencies of your package. It would try to achieve that from the
current situation by rebuilding packages against different versions of
their dependencies.

If you don't have a .cabal file for your project you can still achieve
the same effect by asking cabal install to install all of the packages
that your project depends on:

cabal install --dry-run haskell-src blah blah blah

That's asking it to find a way of installing all those packages with
consistent deps (which may involve reinstalling some).

The --dry-run will make it show a list of what it would install and some
indication of why. If you use -v too it'll tell you for example if it's
going to rebuild a package against a different version of one of it's
dependencies.

Duncan

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


Re: [Haskell-cafe] Cabal: local documentation

2009-02-25 Thread Martijn van Steenbergen

Duncan Coutts wrote:

On Tue, 2009-02-24 at 17:42 +0100, Svein Ove Aas wrote:

2009/2/24 Felipe Lessa felipe.le...@gmail.com:

Just pass '--enable-documentation' to 'cabal install'. On *nix they're
generated at ~/.cabal/share/doc.


Or edit ~/.cabal/config and set the documentation key to True


However this does not maintain a complete module index like I think
Martijn is after.


Thank you all for the very helpful suggestions. I edited ~/.cabal/config 
to generate documentation by default, and I set up Apache to serve the 
documentation from http://haddock. I put a small PHP (gasp!) file in 
~/.cabal/share/doc that lists all packages for which there is 
documentation; see below. This is a good enough approximation for now. 
Thanks again!


Martijn.

---

html
head
titleLocal Hackage packages/title
/head
body
h1Local Hackage packages/h1
ul
?

$handle = opendir(dirname(__FILE__));

while (false !== ($pkg = readdir($handle))) {
  if ($pkg == . || $pkg == ..) continue;
  $link = $pkg/html/;
  if (file_exists(${link}index.html)) {
echo 'lia href=' . $link . '' . $pkg . '/a/li' . \n;
  }
}

?
/ul
/body
/html

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


[Haskell-cafe] cabal install profiling and documentation

2009-02-25 Thread Ben
i've gone and cabal installed a lot of packages, but now i want to go
back and install their profiling libraries and documentation.  is
there an easy way of doing this, short of reinstalling all of them (in
the proper dependency order)?

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


[Haskell-cafe] Cabal: local documentation

2009-02-24 Thread Martijn van Steenbergen

Hello,

Can cabal automatically generate local documentation for packages I 
install? It'd be awesome if it generated a page like [1] for locally 
installed packages.


Thanks,

Martijn.


[1] http://www.haskell.org/ghc/dist/current/docs/libraries/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal: local documentation

2009-02-24 Thread Felipe Lessa
Just pass '--enable-documentation' to 'cabal install'. On *nix they're
generated at ~/.cabal/share/doc.

HTH,

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


Re: [Haskell-cafe] Cabal: local documentation

2009-02-24 Thread Svein Ove Aas
2009/2/24 Felipe Lessa felipe.le...@gmail.com:
 Just pass '--enable-documentation' to 'cabal install'. On *nix they're
 generated at ~/.cabal/share/doc.

Or edit ~/.cabal/config and set the documentation key to True
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal: local documentation

2009-02-24 Thread Duncan Coutts
On Tue, 2009-02-24 at 17:42 +0100, Svein Ove Aas wrote:
 2009/2/24 Felipe Lessa felipe.le...@gmail.com:
  Just pass '--enable-documentation' to 'cabal install'. On *nix they're
  generated at ~/.cabal/share/doc.
 
 Or edit ~/.cabal/config and set the documentation key to True

However this does not maintain a complete module index like I think
Martijn is after.

It would be great if someone volunteered to implement that. There's a
ticket open for it:
http://hackage.haskell.org/trac/hackage/ticket/206

One question is where to put a central index. This is especially true
for the case of global installations. For per-user installs it's
probably fine to use ~/.cabal/share/doc/index.html or something, but for
the case of /usr/local that's certainly not ok. Needs some thought.

Duncan

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


Re: [Haskell-cafe] Cabal and more than one version

2009-02-03 Thread Sean Leather
 Presumably the template-haskell-2.3 package does not build with ghc-6.8
 but fails to correctly specify the version of base or ghc that it
 requires. If it did then we would have a better chance to get this
 right.


Yes, this is certainly an issue in general with template-haskell-2.3. How do
we fix this?


 Another possible workaround...

 If you avoid using the flag hack then the solver would not have to
 choose so early which version of template-haskell to commit to and it
 would be able to pick the right version later. Though then you need an
 alternative method of finding which version of template-haskell you
 ended up with. You could do it with some custom code in Setup.hs.


I don't mind using a different approach. How do I detect which version of
template-haskell I'm using in Setup.lhs that is backwords compatible to
Cabal 1.2? I would like to support both template-haskell-2.2 and -2.3 by
deriving EMGM type representations for it, but the later has the 'Loc'
datatype. So, I'm currently using the CPP flag to determine whether 'Loc' is
available or not:

*#ifdef TH_LOC_DERIVEREP
**-- This type is only provided in template-haskell-2.3 (included with GHC 6.10)
**-- and up.
*$(derive ''Loc)
*#endif
*

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


Re: [Haskell-cafe] Cabal and more than one version

2009-02-03 Thread Duncan Coutts
On Tue, 2009-02-03 at 10:38 +0100, Sean Leather wrote:
 
 Presumably the template-haskell-2.3 package does not build
 with ghc-6.8
 but fails to correctly specify the version of base or ghc that
 it
 requires. If it did then we would have a better chance to get
 this
 right.
 
 Yes, this is certainly an issue in general with template-haskell-2.3.
 How do we fix this?

We patch the .cabal file in the current darcs version so that its fixed
in the next release.

 Another possible workaround...
 
 If you avoid using the flag hack then the solver would not
 have to
 choose so early which version of template-haskell to commit to
 and it
 would be able to pick the right version later. Though then you
 need an
 alternative method of finding which version of
 template-haskell you
 ended up with. You could do it with some custom code in
 Setup.hs.
 
 I don't mind using a different approach. How do I detect which version
 of template-haskell I'm using in Setup.lhs that is backwords
 compatible to Cabal 1.2?

You get access to the LocalBuildInfo which contains the packageDeps, the
exact package identifiers. You can find the package you're after and
find its version. Then you can do one of two things. You could generate
a .h file either during post-conf or pre-build or you could add a cpp
option by updating the localPkgDescr in the LocalBuildInfo to add an
extra cpp option.

It's not necessarily short or pretty, but it should be possible to make
it work with Cabal-1.2 and 1.6.

Duncan

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


Re: [Haskell-cafe] Cabal and more than one version

2009-02-02 Thread Sean Leather
Hi,

I'm bringing up an old thread, because it's very relevant to my problem.

On Tue, Nov 18, 2008 at 22:30, Duncan Coutts wrote:

 On Tue, 2008-11-18 at 01:48 -0800, Jason Dusek wrote:
  I'd like to be able to do something like:
 
  if (template-haskell  2.3)
cpp-options: -D TH_THE_YOUNGER
  else
cpp-options: -D TH_THE_ELDER
 
I guess this kind of thing is not possible at present?

 It is possible, in two different ways.

 The easiest way is that if you're using Cabal-1.6 then it provides cpp
 macros to test the version number of packages you're using.

 #if MIN_VERSION_template_haskell(2,3,0)
 ...
 #elseif
 ...
 #endif

 The alternative that works back to Cabal-1.2 is to use:

 flag newer-th

 ...
  if flag(newer-th)
build-depends: template-haskell = 2.3
cpp-options: -D TH_THE_ELDER
  else
build-depends: template-haskell  2.3
 cpp-options: -D TH_THE_YOUNGER


Either I'm doing something wrong or this doesn't work for cabal-install and
GHC 6.8.3. I used the flag newer-th approach in EMGM:


https://svn.cs.uu.nl:12443/viewvc/dgp-haskell/EMGM/tags/emgm-0.2/emgm.cabal?view=markup

[...]

flag th23
   description: Define a CPP flag that enables conditional compilation
for template-haskell package version 2.3 and newer.

Library

  [...]

   build-depends: base = 3.0   4.0,
  template-haskell  2.4

  -- Include deriveRep for Loc. This was introduced with
  -- template-haskell-2.3, included with GHC 6.10.
  if flag(th23)
build-depends: template-haskell = 2.3
cpp-options: -DTH_LOC_DERIVEREP
  else
build-depends: template-haskell  2.3

  [...]

When I run cabal install emgm (with GHC 6.8.3 and either Cabal 1.2 or 1.6),
it tries (and fails) to install template-haskell-2.3. That's exactly what I
don't want. Any suggestions?

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


Re: [Haskell-cafe] cabal list can't find Glob.cabal file?

2009-02-02 Thread Dougal Stanton
On Mon, Feb 2, 2009 at 12:01 AM, Duncan Coutts
duncan.cou...@worc.ox.ac.uk wrote:

 The solution is to upgrade:

 $ cabal install cabal-install

 $ cabal --version
 cabal-install version 0.6.0
 using version 1.6.0.1 of the Cabal library

Yes, this was the problem, despite me upgrading cabal-install before
mailing the list. Alas, an old cabal binary was being picked up from
/usr/local/bin.

Cheers for the help,


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


Re: [Haskell-cafe] Cabal and more than one version

2009-02-02 Thread Duncan Coutts
On Mon, 2009-02-02 at 13:18 +0100, Sean Leather wrote:

 Either I'm doing something wrong or this doesn't work for
 cabal-install and GHC 6.8.3. I used the flag newer-th approach in
 EMGM:
 
 
 https://svn.cs.uu.nl:12443/viewvc/dgp-haskell/EMGM/tags/emgm-0.2/emgm.cabal?view=markup
 
 [...]
 
 flag th23
description: Define a CPP flag that enables conditional compilation
 for template-haskell package version 2.3 and newer.
 
 Library
 
   [...]
 
build-depends: base = 3.0   4.0,
   template-haskell  2.4
 
   -- Include deriveRep for Loc. This was introduced with
   -- template-haskell-2.3, included with GHC 6.10.
   if flag(th23)
 build-depends: template-haskell = 2.3
 cpp-options: -DTH_LOC_DERIVEREP
   else
 build-depends: template-haskell  2.3
 
   [...]
 
 When I run cabal install emgm (with GHC 6.8.3 and either Cabal 1.2 or
 1.6), it tries (and fails) to install template-haskell-2.3. That's
 exactly what I don't want. Any suggestions?

No immediate workarounds, though you could perhaps try reversing the
condition or the default of the flag. Though that might just reverse the
problem case.

Presumably the template-haskell-2.3 package does not build with ghc-6.8
but fails to correctly specify the version of base or ghc that it
requires. If it did then we would have a better chance to get this
right.

In general this is going to be hard. The solver is not that smart and it
deliberately does no backtracking (as a defence against searching too
much given that it has no smart methods for pruning the search space).
This is just the kind of situation where we need a proper solver which
is probably a couple months work.

Another possible workaround...

If you avoid using the flag hack then the solver would not have to
choose so early which version of template-haskell to commit to and it
would be able to pick the right version later. Though then you need an
alternative method of finding which version of template-haskell you
ended up with. You could do it with some custom code in Setup.hs.

Duncan

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


[Haskell-cafe] cabal list can't find Glob.cabal file?

2009-02-01 Thread Dougal Stanton
I get a curious message when trying to run 'cabal list':

$ cabal list

  omit some lines...
  ..
  Latest version available: 0.3
  Category: Network
  Synopsis: Pure bindings for the MaxMind IP database.
  License:  OtherLicense

cabal: Couldn't read cabal file ./Glob/0.1/Glob.cabal


Any ideas? As far as Hackage and the local index are concerned, 0.1
isn't even a recent version of Glob. Why should it be looking for the
file?

cabal-install version 0.5.1
using version 1.4.0.1 of the Cabal library



-- 
Dougal Stanton
dou...@dougalstanton.net // http://www.dougalstanton.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal list can't find Glob.cabal file?

2009-02-01 Thread Duncan Coutts
On Sun, 2009-02-01 at 23:04 +, Dougal Stanton wrote:
 I get a curious message when trying to run 'cabal list':
 
 $ cabal list
 
   omit some lines...
   ..
   Latest version available: 0.3
   Category: Network
   Synopsis: Pure bindings for the MaxMind IP database.
   License:  OtherLicense
 
 cabal: Couldn't read cabal file ./Glob/0.1/Glob.cabal

Cabal-1.4 cannot read some .cabal files that use new syntactic
constructs added in Cabal-1.6. The cabal-install program does not handle
this fact very gracefully.

 Any ideas? As far as Hackage and the local index are concerned, 0.1
 isn't even a recent version of Glob. Why should it be looking for the
 file?

It's a good point, it should not need to parse the .cabal file of the
older version. However that's just a performance thing, the newer
versions will have the same issue.

 cabal-install version 0.5.1
 using version 1.4.0.1 of the Cabal library

The solution is to upgrade:

$ cabal install cabal-install

$ cabal --version
cabal-install version 0.6.0
using version 1.6.0.1 of the Cabal library 


Duncan

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


Re: [Haskell-cafe] Cabal dependencies

2009-01-20 Thread Duncan Coutts
On Thu, 2009-01-15 at 18:38 -0500, Stephen Hicks wrote:
 Hi,
 
 I'm having some difficulty specifying dependencies in my .cabal file
 for a package I'm looking to upload to hackage soon.  The difficulty
 is as follows.  I basically want to specify
   parsec (= 2.1   3.0.0) || ( 3.0.0   4)

When we first introduced this kind of version range syntax we were
unsure if it was too general or not. We want to be able to translate
into other systems and they're typically more restrictive.

Internally we can easily represent the above expression as it uses
arbitrary unions and intersections. However the external parser still
only allows two clauses (I think it's two).

Personally I'm all for lifting that restriction. Yes it makes it a bit
harder for translating into some systems but I don't see that as a real
issue. If the package really does require the more complex version range
then forcing the package author to lie by using a less expressive syntax
does not help. We can still make the same choice at the point when we
translate into native packages.

Also, as it happens there is a way of getting around the restriction
anyway, which makes the restriction effectively pointless. That is by
listing the same dependency more than once. All the version constraints
must be satisfied so you can write:

  build-depends:
parsec = 2.1   4,
parsec  3.0.0 ||  3.0.0

(have I got that right?)

So I'd be interested to get feedback on lifting the restriction and the
impact that might have on translation into native packages.

 The problem is that 3.0.0 as it exists on hackage is missing a
 constructor that I need (namely, Postfix, in the compatibility
 module).  The bug was fixed and will presumably work fine if a newer
 version of parsec is ever uploaded to hackage, and my package works
 fine with older parsecs as well - I just want to exclude this one
 version.  How can I go about doing that?

Try the above.

 A secondary question is this - I can actually compile with version
 3.0.0 by just not using this constructor, although it does reduce the
 package's functionality.  I've seen flags in various .cabal files, and
 presumably I could invent a flag to make it work with 3.0.0, but I'm
 confused about how these flags are set.

Yes, if you need compatibility with older versions of Cabal then you'd
need to use a flag. If you're prepared to require Cabal-1.6 or later
then you can use the cpp macro:

#if MIN_VERSION_parsec(3,0,0)

though of course that only gives you = 3.0.0, you'd need more tricky
combinations to get == 3.0.0, perhaps by assuming = 3.0.1 is ok.

For older Cabal versions the main option is a flag, like so:

flag parsec3
...

if flag(parsec3)
  build-depends: parsec == 3.0.0
  cpp-options:   -DUSING_BAD_PARSEC
else
  build-depends: parsec  3.0.0 ||  3.0.0

 Specifically, cabal-install has never asked me anything about flags,
 so what's the point?  Or does it automatically set whichever flags
 satisfy the dependencies?

It tries to work out what flags to set automatically (based on the
platform, the available packages and flag defaults in each package). You
can override them from the command line if you want to or need to.

Duncan

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


[Haskell-cafe] Cabal dependencies

2009-01-15 Thread Stephen Hicks
Hi,

I'm having some difficulty specifying dependencies in my .cabal file
for a package I'm looking to upload to hackage soon.  The difficulty
is as follows.  I basically want to specify
  parsec (= 2.1   3.0.0) || ( 3.0.0   4)
The problem is that 3.0.0 as it exists on hackage is missing a
constructor that I need (namely, Postfix, in the compatibility
module).  The bug was fixed and will presumably work fine if a newer
version of parsec is ever uploaded to hackage, and my package works
fine with older parsecs as well - I just want to exclude this one
version.  How can I go about doing that?

A secondary question is this - I can actually compile with version
3.0.0 by just not using this constructor, although it does reduce the
package's functionality.  I've seen flags in various .cabal files, and
presumably I could invent a flag to make it work with 3.0.0, but I'm
confused about how these flags are set.  Specifically, cabal-install
has never asked me anything about flags, so what's the point?  Or does
it automatically set whichever flags satisfy the dependencies?

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


<    2   3   4   5   6   7   8   9   10   >