Re: [Haskell-cafe] Cabal install specific version of a package

2009-09-02 Thread Job Vranish
cabal install derive-0.1.4

On Wed, Sep 2, 2009 at 1:12 PM, Grigory Sarnitskiy  wrote:

> How to install specific version of a package (derive 0.1.4)?
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Cabal install specific version of a package

2009-09-02 Thread Grigory Sarnitskiy
How to install specific version of a package (derive 0.1.4)?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] 'cabal install lhs2tex' fails for me on os x -- help please

2009-07-27 Thread Conal Elliott
Yo ho!  I just installed ghc-6.10.4 over my 6.10.3.  Now 'cabal install
lhs2tex' works.  Phew!

On Mon, Jul 27, 2009 at 11:44 AM, Conal Elliott  wrote:

> Via cabal:
>>
>>--constraint='base<4'
>>
>> or replace Control.Exception with Control.OldException
>>
>> or add 'base < 4'  to the depends in the .cabal file.
>>
>
> Thanks, Don.
>
> Trying your first suggestion, I get the same result for the first and third
> method, and a ghc panic on cat_evals for the second method.  All happening
> in ghc-6.10.3 installed via the Haskell Platform last week on OS X.
>
> bash-3.2$ cabal install lhs2tex --constraint='base<4'
> Resolving dependencies...
> [1 of 1] Compiling Main (
> /tmp/lhs2tex-1.1424460/lhs2tex-1.14/Setup.hs,
> /tmp/lhs2tex-1.1424460/lhs2tex-1.14/dist/setup/Main.o )
> Linking /tmp/lhs2tex-1.1424460/lhs2tex-1.14/dist/setup/setup ...
> Configuring lhs2tex-1.14...
> cabal: Error: some packages failed to install:
> lhs2tex-1.14 failed during the configure step. The exception was:
> exit: ExitFailure 11
>
> Still fishy about compiling Main first.
>
> Now I'll edit add the '< 4' constraint on base, giving the same result:
>
> bash-3.2$ dirs
> ~/cabal
> bash-3.2$ cabal unpack lhs2tex
> Unpacking lhs2tex-1.14...
> bash-3.2$ cd lhs2tex-1.14
>
> [lhs2tex.cabal edit happens here]
>
> bash-3.2$ cabal install
> Resolving dependencies...
> [1 of 1] Compiling Main ( Setup.hs, dist/setup/Main.o )
> Linking ./dist/setup/setup ...
> Configuring lhs2tex-1.14...
> cabal: Error: some packages failed to install:
> lhs2tex-1.14 failed during the configure step. The exception was:
> exit: ExitFailure 11
>
> Note that on linux, the package compiles without changing the base
> constraint. I don't know how.
>
> Finally, use explicit ./configure & make:
>
> bash-3.2$ ./configure
> bash: ./configure: Permission denied
> bash-3.2$ sh configure
> checking for ghc... /usr/bin/ghc
> checking for hugs... no
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether ln -s works... yes
> checking for mv... /bin/mv
> checking for cp... /bin/cp
> checking for rm... /bin/rm
> checking for mkdir... /bin/mkdir
> checking for touch... /usr/bin/touch
> checking for diff... /usr/bin/diff
> checking for grep... /usr/bin/grep
> checking for sed... /usr/bin/sed
> checking for sort... /usr/bin/sort
> checking for uniq... /usr/bin/uniq
> checking for find... /usr/bin/find
> checking for latex...
> /usr/local/texlive/2008/bin/universal-darwin/latex
> checking for pdflatex...
> /usr/local/texlive/2008/bin/universal-darwin/pdflatex
> checking for xdvi... /usr/local/texlive/2008/bin/universal-darwin/xdvi
> checking for gv... no
> checking for dvips...
> /usr/local/texlive/2008/bin/universal-darwin/dvips
> checking for kpsewhich...
> /usr/local/texlive/2008/bin/universal-darwin/kpsewhich
> checking for a texmf tree... /usr/local/texlive/2008/../texmf-local
> checking for texmf.cnf... yes
> checking for the polytable package...
> /usr/local/texlive/2008/texmf-dist/tex/latex/polytable/polytable.sty
> checking for version of polytable... 0.8.2
> checking whether polytable needs to be installed... no
> checking for mktexlsr...
> /usr/local/texlive/2008/bin/universal-darwin/mktexlsr
> configure: creating ./config.status
> config.status: creating config.mk
> config.status: creating Version.lhs
> config.status: creating lhs2TeX.1
> config.status: creating doc/InteractiveHugs.lhs
> config.status: creating doc/InteractivePre.lhs
> Configuration succesfully completed.
> Say
>  make   to compile and build documentation
>  make bin   to compile the binary only
>  make install   to (compile and) install
>
> [edit happens here, changing Control.Exception to Control.OldException.]
>
> bash-3.2$ ./configure
> bash: ./configure: Permission denied
> bash-3.2$ sh configure
> checking for ghc... /usr/bin/ghc
> checking for hugs... no
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether ln -s works... yes
> checking for mv... /bin/mv
> checking for cp... /bin/cp
> checking for rm... /bin/rm
> checking for mkdir... /bin/mkdir
> checking for touch... /usr/bin/touch
> checking for diff... /usr/bin/diff
> checking for grep... /usr/bin/grep
> checking for sed... /usr/bin/sed
> checking for sort... /usr/bin/sort
> checking for uniq... /usr/bin/uniq
> checking for find... /usr/bin/find
> checking for latex...
> /usr/local/texlive/2008/bin/universal-darwin/latex
> checking for pdflatex...
> /usr/local/texlive/2008/bin/universal-darwin/pdflatex
> checking for xdvi... /usr/local/texlive/2008/bin/universal-darwin/xdvi
> checking for gv... no
>

Re: [Haskell-cafe] 'cabal install lhs2tex' fails for me on os x -- help please

2009-07-27 Thread Conal Elliott
>
> Via cabal:
>
>--constraint='base<4'
>
> or replace Control.Exception with Control.OldException
>
> or add 'base < 4'  to the depends in the .cabal file.
>

Thanks, Don.

Trying your first suggestion, I get the same result for the first and third
method, and a ghc panic on cat_evals for the second method.  All happening
in ghc-6.10.3 installed via the Haskell Platform last week on OS X.

bash-3.2$ cabal install lhs2tex --constraint='base<4'
Resolving dependencies...
[1 of 1] Compiling Main (
/tmp/lhs2tex-1.1424460/lhs2tex-1.14/Setup.hs,
/tmp/lhs2tex-1.1424460/lhs2tex-1.14/dist/setup/Main.o )
Linking /tmp/lhs2tex-1.1424460/lhs2tex-1.14/dist/setup/setup ...
Configuring lhs2tex-1.14...
cabal: Error: some packages failed to install:
lhs2tex-1.14 failed during the configure step. The exception was:
exit: ExitFailure 11

Still fishy about compiling Main first.

Now I'll edit add the '< 4' constraint on base, giving the same result:

bash-3.2$ dirs
~/cabal
bash-3.2$ cabal unpack lhs2tex
Unpacking lhs2tex-1.14...
bash-3.2$ cd lhs2tex-1.14

[lhs2tex.cabal edit happens here]

bash-3.2$ cabal install
Resolving dependencies...
[1 of 1] Compiling Main ( Setup.hs, dist/setup/Main.o )
Linking ./dist/setup/setup ...
Configuring lhs2tex-1.14...
cabal: Error: some packages failed to install:
lhs2tex-1.14 failed during the configure step. The exception was:
exit: ExitFailure 11

Note that on linux, the package compiles without changing the base
constraint. I don't know how.

Finally, use explicit ./configure & make:

bash-3.2$ ./configure
bash: ./configure: Permission denied
bash-3.2$ sh configure
checking for ghc... /usr/bin/ghc
checking for hugs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for mv... /bin/mv
checking for cp... /bin/cp
checking for rm... /bin/rm
checking for mkdir... /bin/mkdir
checking for touch... /usr/bin/touch
checking for diff... /usr/bin/diff
checking for grep... /usr/bin/grep
checking for sed... /usr/bin/sed
checking for sort... /usr/bin/sort
checking for uniq... /usr/bin/uniq
checking for find... /usr/bin/find
checking for latex... /usr/local/texlive/2008/bin/universal-darwin/latex
checking for pdflatex...
/usr/local/texlive/2008/bin/universal-darwin/pdflatex
checking for xdvi... /usr/local/texlive/2008/bin/universal-darwin/xdvi
checking for gv... no
checking for dvips... /usr/local/texlive/2008/bin/universal-darwin/dvips
checking for kpsewhich...
/usr/local/texlive/2008/bin/universal-darwin/kpsewhich
checking for a texmf tree... /usr/local/texlive/2008/../texmf-local
checking for texmf.cnf... yes
checking for the polytable package...
/usr/local/texlive/2008/texmf-dist/tex/latex/polytable/polytable.sty
checking for version of polytable... 0.8.2
checking whether polytable needs to be installed... no
checking for mktexlsr...
/usr/local/texlive/2008/bin/universal-darwin/mktexlsr
configure: creating ./config.status
config.status: creating config.mk
config.status: creating Version.lhs
config.status: creating lhs2TeX.1
config.status: creating doc/InteractiveHugs.lhs
config.status: creating doc/InteractivePre.lhs
Configuration succesfully completed.
Say
 make   to compile and build documentation
 make bin   to compile the binary only
 make install   to (compile and) install

[edit happens here, changing Control.Exception to Control.OldException.]

bash-3.2$ ./configure
bash: ./configure: Permission denied
bash-3.2$ sh configure
checking for ghc... /usr/bin/ghc
checking for hugs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for mv... /bin/mv
checking for cp... /bin/cp
checking for rm... /bin/rm
checking for mkdir... /bin/mkdir
checking for touch... /usr/bin/touch
checking for diff... /usr/bin/diff
checking for grep... /usr/bin/grep
checking for sed... /usr/bin/sed
checking for sort... /usr/bin/sort
checking for uniq... /usr/bin/uniq
checking for find... /usr/bin/find
checking for latex... /usr/local/texlive/2008/bin/universal-darwin/latex
checking for pdflatex...
/usr/local/texlive/2008/bin/universal-darwin/pdflatex
checking for xdvi... /usr/local/texlive/2008/bin/universal-darwin/xdvi
checking for gv... no
checking for dvips... /usr/local/texlive/2008/bin/universal-darwin/dvips
checking for kpsewhich...
/usr/local/texlive/2008/bin/universal-darwin/kpsewhich
checking for a texmf tree... /usr/local/texlive/2008/../texmf-local
checking for texmf.cnf... yes
checking for the polytable package...
/usr/local/texlive/2008/texmf-dist/tex/latex/polytable/polytable.sty
   

Re: [Haskell-cafe] 'cabal install lhs2tex' fails for me on os x -- help please

2009-07-27 Thread Brandon S. Allbery KF8NH

On Jul 27, 2009, at 14:23 , Conal Elliott wrote:
Note that the the first module to be compiled is Main.  On my linux  
machine, Main is the *last* of several modules to be compiled.


It's compiling the setup program which is presumably used by cabal to  
do the work a configure script normally does.  "cabal install -- 
verbose=3 lhs2tex" might show what setup is upset about.


--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon universityKF8NH




PGP.sig
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] 'cabal install lhs2tex' fails for me on os x -- help please

2009-07-27 Thread Don Stewart
conal:
> Fails during configuration:
> 
> bash-3.2$ cabal install lhs2tex
> Resolving dependencies...
> [1 of 1] Compiling Main ( /tmp/lhs2tex-1.1423397/lhs2tex-1.14/
> Setup.hs, /tmp/lhs2tex-1.1423397/lhs2tex-1.14/dist/setup/Main.o )
> Linking /tmp/lhs2tex-1.1423397/lhs2tex-1.14/dist/setup/setup ...
> Configuring lhs2tex-1.14...
> cabal: Error: some packages failed to install:
> lhs2tex-1.14 failed during the configure step. The exception was:
> exit: ExitFailure 11
> 
> Note that the the first module to be compiled is Main.  On my linux machine,
> Main is the *last* of several modules to be compiled.
> 
> Here's my failure log: http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=3096#
> a3096 .
> 
> If instead I use ./configure and make, i get errors due to use of the old
> Exception API:
> 
> ...
> [17 of 19] Compiling FileNameUtils( FileNameUtils.lhs, FileNameUtils.o
> )
> 
> FileNameUtils.lhs:81:35:
> Ambiguous type variable `b' in the constraint:
>   `GHC.Exception.Exception b'
> arising from a use of `catch' at FileNameUtils.lhs:(81,35)-(89,60)
> Probable fix: add a type signature that fixes these type variable(s)
> ...
> 
> Suggestions greatly appreciated!

Via cabal:

--constraint='base<4'

or replace Control.Exception with Control.OldException

or add 'base < 4'  to the depends in the .cabal file.

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


[Haskell-cafe] 'cabal install lhs2tex' fails for me on os x -- help please

2009-07-27 Thread Conal Elliott
Fails during configuration:

bash-3.2$ cabal install lhs2tex
Resolving dependencies...
[1 of 1] Compiling Main (
/tmp/lhs2tex-1.1423397/lhs2tex-1.14/Setup.hs,
/tmp/lhs2tex-1.1423397/lhs2tex-1.14/dist/setup/Main.o )
Linking /tmp/lhs2tex-1.1423397/lhs2tex-1.14/dist/setup/setup ...
Configuring lhs2tex-1.14...
cabal: Error: some packages failed to install:
lhs2tex-1.14 failed during the configure step. The exception was:
exit: ExitFailure 11

Note that the the first module to be compiled is Main.  On my linux machine,
Main is the *last* of several modules to be compiled.

Here's my failure log:
http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=3096#a3096 .

If instead I use ./configure and make, i get errors due to use of the old
Exception API:

...
[17 of 19] Compiling FileNameUtils( FileNameUtils.lhs,
FileNameUtils.o )

FileNameUtils.lhs:81:35:
Ambiguous type variable `b' in the constraint:
  `GHC.Exception.Exception b'
arising from a use of `catch' at
FileNameUtils.lhs:(81,35)-(89,60)
Probable fix: add a type signature that fixes these type variable(s)
...

Suggestions greatly appreciated!

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


Re: [Haskell-cafe] cabal version issue

2009-07-18 Thread Sjoerd Visscher
The message means that the .cabal file should contain the line "Cabal- 
Version: >= 1.2"


Sjoerd

On Jul 18, 2009, at 11:17 AM, Vasili I. Galchin wrote:


Hello,

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

vigalc...@ubuntu:~/FTP/Haskell/Swish-0.2.1$ cabal configure --user -- 
prefix=$HOME

Warning: swish.cabal: A package using section syntax should require
"Cabal-Version: >= 1.2" or equivalent.
Warning: swish.cabal: A package using section syntax should require
"Cabal-Version: >= 1.2" or equivalent.

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


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


--
Sjoerd Visscher
sjo...@w3future.com



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


[Haskell-cafe] cabal version issue

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

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

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

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

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


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 Jason Dagit
On Mon, Jun 29, 2009 at 12:55 PM, Andrew Coppin  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


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


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

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

   E:\Haskell\AOC-HalfInteger>cabal 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

Jason Dagit wrote:



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


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

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

E:\Haskell\AOC-HalfInteger>cabal 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 Antoine Latter
On Mon, Jun 29, 2009 at 2:12 PM, Jason Dagit 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 Jason Dagit
On Mon, Jun 29, 2009 at 11:57 AM, Andrew Coppin  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-HalfInteger>cabal configure
> Resolving dependencies...
> Configuring AOC-HalfInteger-1.0...
>
> E:\Haskell\AOC-HalfInteger>cabal 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 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-HalfInteger>cabal configure
Resolving dependencies...
Configuring AOC-HalfInteger-1.0...

E:\Haskell\AOC-HalfInteger>cabal 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 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 Antoine Latter
On Mon, Jun 29, 2009 at 1:03 PM, Andrew
Coppin 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

Derek Elkins wrote:

On Sun, Jun 28, 2009 at 4:11 PM, Antoine Latter wrote:
  

On Sun, Jun 28, 2009 at 3:42 PM, Andrew
Coppin 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-28 Thread Derek Elkins
On Sun, Jun 28, 2009 at 4:11 PM, Antoine Latter wrote:
> On Sun, Jun 28, 2009 at 3:42 PM, Andrew
> Coppin 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-HalfInteger>runhaskell 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 fun [Half-integer]

2009-06-28 Thread Antoine Latter
On Sun, Jun 28, 2009 at 3:42 PM, Andrew
Coppin 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-HalfInteger>runhaskell 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 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-HalfInteger>runhaskell 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


[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
Coppin 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-HalfInteger>runhaskell 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] 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  [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 Cheplyaka wrote:
> > > * Magicloud Magiclouds  [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 Cheplyaka wrote:
> > >> > * Magicloud Magiclouds  [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] 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  [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 Cheplyaka wrote:
> > * Magicloud Magiclouds  [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 Cheplyaka wrote:
> >> > * Magicloud Magiclouds  [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-14 Thread Roman Cheplyaka
* Magicloud Magiclouds  [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 Cheplyaka wrote:
> > * Magicloud Magiclouds  [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] How to deal with build-depency that not under cabal's control?

2009-06-14 Thread Roman Cheplyaka
* Magicloud Magiclouds  [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


[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 "addressibility" problem

2009-06-08 Thread Malcolm Wallace
"Vasili I. Galchin"  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


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.hs   <<< changed 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   
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 "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 Vasili I. Galchin
getting farther .

Executable GraphPartitionTest
   Hs-source-dirs: Swish/  << added this
   Main-Is:HaskellRDF/GraphPartitionTest.hs   <<< changed 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  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
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  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: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
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  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 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


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

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

You mean ticket 234?

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

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

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


Re: [Haskell-cafe] Cabal/primes

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

  -- ryan

On Wed, Jun 3, 2009 at 3:40 PM, Don Stewart  wrote:
> nowgate:
>> Got it working.
>>
>> I downloaded two packages, primes and Numbers. Since Numbers has the three
>> functions I want to use, primes, isPrime and isProbablyPrime, how do I
>> uninstall the primes package so there won't be a conflict?
>
>
> Easy!
>
>    $ ghc-pkg unregister primes
>
> -- Don
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal/primes

2009-06-03 Thread michael rice
Excellent!

Thanks.

Michael

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

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

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


Easy!

    $ ghc-pkg unregister primes

-- Don



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


Re: [Haskell-cafe] Cabal/primes

2009-06-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
Got it working.

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

Michael

=

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


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

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

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

Michael

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

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

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

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


=



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

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

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

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

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




  
-Inline Attachment Follows-

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



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


Re: [Haskell-cafe] Cabal/primes

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

Michael

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

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

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

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


=



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

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

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

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

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




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


Re: [Haskell-cafe] Cabal/primes

2009-06-03 Thread 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
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-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/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

: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 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 option to specify the ghc version?

2009-05-27 Thread David Menendez
On Wed, May 27, 2009 at 5:25 PM, 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.

According to 
,
you would use the --with-compiler option.

-- 
Dave Menendez 

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


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


[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 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
wrote:

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

> 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 wrote:
>
>> sorrily nope, Brian ...
>>
>> Vasili
>>
>>
>> On Wed, May 6, 2009 at 6:06 PM,  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
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 wrote:

> sorrily nope, Brian ...
>
> Vasili
>
>
> On Wed, May 6, 2009 at 6:06 PM,  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
sorrily nope, Brian ...

Vasili

On Wed, May 6, 2009 at 6:06 PM,  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


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


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  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 ' (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 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


[Haskell-cafe] Cabal and WinHugs

2009-04-12 Thread Iavor Diatchki
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)?
Thanks for any info that anyone might have,
Iavor
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal haddock and Paths_Xxx

2009-04-11 Thread Martijn van Steenbergen

Andrea Vezzosi wrote:

Which version of Cabal are you using?
It should be fixed with Cabal-1.6.0.2, check cabal --version to make
sure it's not using an older one.


You're absolutely right. Thanks!

Martijn.

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


Re: [Haskell-cafe] cabal haddock and Paths_Xxx

2009-04-08 Thread Andrea Vezzosi
Which version of Cabal are you using?
It should be fixed with Cabal-1.6.0.2, check cabal --version to make
sure it's not using an older one.

On Mon, Apr 6, 2009 at 8:32 PM, Martijn van Steenbergen
 wrote:
> 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 mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] cabal on mac os x (gmp problem)

2009-04-07 Thread brian

For future reference:

Solved, I just created a symlink to libgmp.dylib in /usr/local, and  
the zlib package was able to build.





___
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


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


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


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


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-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 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  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 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  
> 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 Gwern Branwen
On Sun, Mar 8, 2009 at 7:13 AM, Manlio Perillo  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-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-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


[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


[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 Duncan Coutts
On Mon, 2009-03-02 at 07:15 -0700, Denis Bueno wrote:
> On Sun, Mar 1, 2009 at 11:56, Duncan Coutts  
> 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


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

2009-03-02 Thread Denis Bueno
On Sun, Mar 1, 2009 at 11:56, Duncan Coutts  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-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


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:  base<4, 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 Gwern Branwen

On Sun, Mar 1, 2009 at 12:10 PM, 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:      base<4, 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 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:  base<4, 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 10:45 AM, Manlio Perillo  
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:  base<4, 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


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


[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


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


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 :

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.

---



Local Hackage packages


Local Hackage packages

' . $pkg . '' . "\n";
  }
}

?>




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