Re[2]: [Haskell-cafe] Re: a cabal/database lib experience

2006-12-13 Thread Bulat Ziganshin
Hello Paul,

Tuesday, December 12, 2006, 4:48:55 PM, you wrote:

./Setup.lhs configure -p
./Setup.lhs build
./Setup.lhs install

 I come from a Python background, and Python's distutils (which feels
 very like cabal - or should that be the other way round?) tends to
 have later commands include earlier ones. So,

i suggest you to write simple script that automates this. i've attached
makefile which i include with all my libs that does this - you need to run
only make install. i propose to all library developers to include such
makefile with their libs

-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]

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


[Haskell-cafe] Re: a cabal/database lib experience

2006-12-12 Thread Simon Marlow

Claus Reinke wrote:


cabal:
   - the separation into interpreter/compiler and resource as Setup
   does not set up the right mindset in users. for instance, you can
   runhaskell Setup.hs --help as for most unixy tools, but who'd
   think of that in this situation, and how much does it help?

   + add a dedicated command cabal, which does nothing more
   than runhaskell Setup, but is more memorable and suggestive


cabal-setup does this, but wasn't included with the latest release of Cabal.  It 
should be in the next one, I hope.  The plan is to deprecate 'runhaskell 
Setup.lhs' in favour of 'cabal-setup'.   Feel free to suggest changing the name 
to 'cabal', although some might argue that 'cabal-get' is the high-level tool 
and should therefore get the name 'cabal' instead.



   - cabal/darcs/haddock are no replacement for minimal help texts:
   cabal should require the existence of a README


absolutely, this has occurred to me too.  There should be a stanard Cabal README 
file, and Don's mkcabal tool could drop it in the tree.


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


Re: [Haskell-cafe] Re: a cabal/database lib experience

2006-12-12 Thread Donald Bruce Stewart
simonmarhaskell:
 Claus Reinke wrote:
 
 cabal:
- the separation into interpreter/compiler and resource as Setup
does not set up the right mindset in users. for instance, you can
runhaskell Setup.hs --help as for most unixy tools, but who'd
think of that in this situation, and how much does it help?
 
+ add a dedicated command cabal, which does nothing more
than runhaskell Setup, but is more memorable and suggestive
 
 cabal-setup does this, but wasn't included with the latest release of 
 Cabal.  It should be in the next one, I hope.  The plan is to deprecate 
 'runhaskell Setup.lhs' in favour of 'cabal-setup'.   Feel free to suggest 
 changing the name to 'cabal', although some might argue that 'cabal-get' is 
 the high-level tool and should therefore get the name 'cabal' instead.
 
- cabal/darcs/haddock are no replacement for minimal help texts:
cabal should require the existence of a README
 
 absolutely, this has occurred to me too.  There should be a stanard Cabal 
 README file, and Don's mkcabal tool could drop it in the tree.

This occurred to me too. My current plan for mkcabal is that it creates:

foo.cabal
Setup.lhs
README
LICENSE

based on a series of interactive questions, or command line args.

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


[Haskell-cafe] Re: a cabal/database lib experience

2006-12-12 Thread Ketil Malde

Simon Marlow wrote:


   + add a dedicated command cabal, which does nothing more
   than runhaskell Setup, but is more memorable and suggestive


cabal-setup does this, but wasn't included with the latest release of 
Cabal.  It should be in the next one, I hope.  The plan is to 
deprecate 'runhaskell Setup.lhs' in favour of 'cabal-setup'.   

I'm possibly using cabal in a simplistic way, but I generally do either

  ./Setup.lhs configure -p
  ./Setup.lhs build
  ./Setup.lhs install

or

  ./Setup.lhs configure -p --prefix=$HOME --user
  ./Setup.lhs build
  ./Setup.lhs install --user  #perhaps not needed anymore?

This is a lot of typing, and at least once I wrote a Makefile to 
automate it (oh, the irony of it!)
Anyway, it would be nice if a 'cabal' command automated the whole 
sequence in one go,

at least as an option.

-k

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


Re: [Haskell-cafe] Re: a cabal/database lib experience

2006-12-12 Thread Paul Moore

On 12/12/06, Ketil Malde [EMAIL PROTECTED] wrote:

I'm possibly using cabal in a simplistic way, but I generally do either

   ./Setup.lhs configure -p
   ./Setup.lhs build
   ./Setup.lhs install

[...]

This is a lot of typing, and at least once I wrote a Makefile to
automate it (oh, the irony of it!)
Anyway, it would be nice if a 'cabal' command automated the whole
sequence in one go, at least as an option.


I come from a Python background, and Python's distutils (which feels
very like cabal - or should that be the other way round?) tends to
have later commands include earlier ones. So,

   setup.py install

automatically does build (there is no explicit configure step).
Distutils tracks changes somehow (probably by file timestamp) to avoid
rerunning builds when not needed. Could cabal do that? I find it hard
to see why someone would want to do install without having done an
up to date build.

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


Re: [Haskell-cafe] Re: a cabal/database lib experience

2006-12-12 Thread Claus Reinke
absolutely, this has occurred to me too.  There should be a stanard Cabal 
README file, and Don's mkcabal tool could drop it in the tree.


This occurred to me too. My current plan for mkcabal is that it creates:

   foo.cabal
   Setup.lhs
   README
   LICENSE

based on a series of interactive questions, or command line args.


is mkcabal going to be a standard part of cabal installations?

btw, here is some suggested text for the useful how to write.. page you 
started (I know it is a wiki, but I don't want to mess up the page at this point;-).


thanks,
claus

 0. The intended user experience

When Haskell programmers go out in search of existing functionality, be it a
library, a tool, or an application, the intended approach is roughly this:

1 visit haskell.org,
2 find the library/program they are looking for 
   (if not found, try mailing list; if it is hidden, try improving haskell.org;
if it does not exist, try contributing code/documentation/requirements/..) 
3 download

4 install
5 enjoy

but each of these steps is endangered by several potential road blocks, and
code authors can do a lot to help code users avoid such blocks. Even if steps 
1/2 are successful, and ensuring step 5 is the main concern of code authors 
and users, it is often steps 3/4 that get in the way:


- which is the latest version? what state is it in? is it still maintained/in 
use?
- what are its aims? where is the documentation?
- which is the right version for given OS and Haskell implementation?
- how is it packaged, and what tools are needed to get and unpack it?
- how is it installed, and what tools are needed to install it?
- how do we avoid IDR (infinite dependency recursion)?
- how do we provide/acquire the knowledge and tool-chains needed?

There is a well-established tradition for communicating the answers to 
these questions: the README text file, placed in a prominent position

at the code's location (these days often accompanied, but not replaced,
by a more extensive web page). But as other communities, the Haskell
community has Haskell-specific answers to many of these questions,
independent of the particular Haskell code to publish. 

This document is all about how to publish your Haskell code in such a 
way as to make the Haskell code users' experience as smooth as possible. 
Until there is a version of this text targetted more specifically at code users, 
they might find it helpful to browse this page for insights into the Haskell 
code authors' mind- and tool-set.


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


[Haskell-cafe] Re: a cabal/database lib experience

2006-12-12 Thread Simon Marlow

Paul Moore wrote:

On 12/12/06, Ketil Malde [EMAIL PROTECTED] wrote:


I'm possibly using cabal in a simplistic way, but I generally do either

   ./Setup.lhs configure -p
   ./Setup.lhs build
   ./Setup.lhs install


[...]


This is a lot of typing, and at least once I wrote a Makefile to
automate it (oh, the irony of it!)
Anyway, it would be nice if a 'cabal' command automated the whole
sequence in one go, at least as an option.



I come from a Python background, and Python's distutils (which feels
very like cabal - or should that be the other way round?) tends to
have later commands include earlier ones. So,

   setup.py install

automatically does build (there is no explicit configure step).


Sounds entirely reasonable to me.  Though configure takes a bunch of arguments; 
so if configure is run automatically it'll always be with the default settings. 
 Maybe that's ok.


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


Re: [Haskell-cafe] Re: a cabal/database lib experience

2006-12-12 Thread Donald Bruce Stewart
claus.reinke:
 absolutely, this has occurred to me too.  There should be a stanard Cabal 
 README file, and Don's mkcabal tool could drop it in the tree.
 
 This occurred to me too. My current plan for mkcabal is that it creates:
 
foo.cabal
Setup.lhs
README
LICENSE
 
 based on a series of interactive questions, or command line args.
 
 is mkcabal going to be a standard part of cabal installations?
 
 btw, here is some suggested text for the useful how to write.. page you 
 started (I know it is a wiki, but I don't want to mess up the page at this 
 point;-).

Thanks Claus.

I've added this text to the page:


http://haskell.org/haskellwiki/How_to_write_a_Haskell_program#Guidelines_for_Haskell_developers

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