Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-24 Thread Donald Bruce Stewart
ross:
> On Sun, Nov 19, 2006 at 03:41:29PM +1100, Donald Bruce Stewart wrote:
> > http://haskell.org/haskellwiki/How_to_write_a_Haskell_program
> > 
> > Feedback welcome!
> 
> There is inconsistent advice regarding Setup.hs/Setup.lhs.
> (#! in .hs files seems to be a feature of GHC Haskell.)

Fixed. And mkcabal generates .lhs Setups now.
  
> For releases, another possibility is Cabal's sdist feature.  This will
> do a bit more checking, and ensure that the tarball has the structure
> expected by HackageDB.  In the example project, you'd want to add
> 
>   extra-source-files: Tests.hs
> 
> to make this work.

Thanks for the constructive suggestions Ross. I've added information on
Cabal's sdist to the page.

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


Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-19 Thread Dougal Stanton
Quoth Donald Bruce Stewart, nevermore,
> Ok, done!

Hehe, you can't leave this community alone for a second... Oh well,
that'll teach me to volunteer for something and then take a few hours
away from the computer! ;-)

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


Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-19 Thread Joachim Breitner
Hi,

Am Montag, den 20.11.2006, 00:32 +1100 schrieb Donald Bruce Stewart:
> For entirely new projects, mkcabal --init-project
> creates an entire new project tree.
> 
> $ runhaskell mkcabal.hs --init-project
> Project name: ruby-on-rails-killer
> Created new project directory: ruby-on-rails-killer
> 
> $ ls ruby-on-rails-killer 
> LICENSE   Ruby-on-rails-killer.hs
> ruby-on-rails-killer.cabal
> READMESetup.hs

Where can I find ruby-on-rails-killer?

Joachim
(SCNR)
-- 
Joachim Breitner
  e-Mail: [EMAIL PROTECTED]
  Homepage: http://www.joachim-breitner.de
  ICQ#: 74513189
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-19 Thread Ross Paterson
On Sun, Nov 19, 2006 at 03:41:29PM +1100, Donald Bruce Stewart wrote:
> http://haskell.org/haskellwiki/How_to_write_a_Haskell_program
> 
> Feedback welcome!

There is inconsistent advice regarding Setup.hs/Setup.lhs.
(#! in .hs files seems to be a feature of GHC Haskell.)

For releases, another possibility is Cabal's sdist feature.  This will
do a bit more checking, and ensure that the tarball has the structure
expected by HackageDB.  In the example project, you'd want to add

extra-source-files: Tests.hs

to make this work.

Regarding hosting, I don't think that darcs.haskell.org is the preferred
solution (unfortunately nor is anything else).

Regarding publicity, another possibility is HackageDB, even if it's not
fully working yet (http://hackage.haskell.org/trac/hackage).

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


Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-19 Thread Donald Bruce Stewart
dons:
> dagit:
> > On 11/19/06, Dougal Stanton <[EMAIL PROTECTED]> wrote:
> > >Quoth Donald Bruce Stewart, nevermore,
> > >> P.S. It might even be useful to have a tool, haskell-project, which
> > >> sets up all these files automatically.
> > >
> > >I was wondering about that just the other day. Is there such an
> > >application to interrogate the user about particulars and then create a
> > >fully compliant *.cabal file?
> > 
> > I'm unaware of such a tool, but as far as UIs go, it should be fairly
> 
> Ok, done!
> 
> darcs get http://www.cse.unsw.edu.au/~dons/code/mkcabal
> 
> mkcabal creates a new project directory for an executable, populates
> with cabal files, setup.hs and a stub .hs file, based on the project
> name.

Jason suggested that it should create just:

Setup.hs
foo.cabal

by default. This is now what mkcabal does. So you can use it to generate
stub .cabal files for existing projects.

$ runhaskell mkcabal.hs
Project name: x
Created Setup.hs and x.cabal

For entirely new projects, mkcabal --init-project
creates an entire new project tree.

$ runhaskell mkcabal.hs --init-project
Project name: ruby-on-rails-killer
Created new project directory: ruby-on-rails-killer

$ ls ruby-on-rails-killer 
LICENSE   Ruby-on-rails-killer.hs
ruby-on-rails-killer.cabal
READMESetup.hs

Further wishlists would be for the default to scan for src files to
populate the .cabal file with, and to distinguish libraries from
executables.

Feedback welcome

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


Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-19 Thread Jason Dagit

On 11/19/06, Dougal Stanton <[EMAIL PROTECTED]> wrote:

Quoth Jason Dagit, nevermore,
> Do we have any enthusiastic people to take this on?  I bet you could
> have something usable in less than a days worth of hacking.

I'll give it a try. Of course I take this opportunity to solicit
suggestions for a name for this application. Which is to say, what
colour should my bike shed be? ;-)


Here is a list to draw ideas from:
The Haskell Project Wizard (bit long but descriptive)
Cabal Wizard
darcs2cabal
autoproj
cabalize (the cabalizer?)
The project butler
repo nanny?
bikeshedgen

I'd say have fun with it :)

And as Chris points out in a different email, team up with the cabal
folks or at least plan to join them by the time you reach your first
release.

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


Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-19 Thread Donald Bruce Stewart
dagit:
> On 11/19/06, Dougal Stanton <[EMAIL PROTECTED]> wrote:
> >Quoth Donald Bruce Stewart, nevermore,
> >> P.S. It might even be useful to have a tool, haskell-project, which
> >> sets up all these files automatically.
> >
> >I was wondering about that just the other day. Is there such an
> >application to interrogate the user about particulars and then create a
> >fully compliant *.cabal file?
> 
> I'm unaware of such a tool, but as far as UIs go, it should be fairly

Ok, done!

darcs get http://www.cse.unsw.edu.au/~dons/code/mkcabal

mkcabal creates a new project directory for an executable, populates
with cabal files, setup.hs and a stub .hs file, based on the project
name.

A transcript:

$ mkcabal 
Project name: haq
Created new project directory: haq

$ cd haq
$ ls
Haq.hsSetup.hs  haq.cabal

$ cat Haq.hs
main :: IO ()
main = putStrLn "Hello, world!"

$ cat Setup.hs 
#!/usr/bin/env runhaskell
import Distribution.Simple
$ cat haq.cabal 
Name:haq
Version: 0.0
Description: Project description
License: BSD3
License-file:LICENSE
Author:  Author Name
Maintainer:  [EMAIL PROTECTED]
Build-Depends:   base
 
Executable:  haq
Main-is: Haq.hs

$ c
Configuring haq-0.0...
...

$ b
Preprocessing executables for haq-0.0...
Building haq-0.0...
[1 of 1] Compiling Main ( Haq.hs, 
/usr/obj/cabal/haq/haq-tmp/Main.o )
Linking /usr/obj/cabal/haq/haq ...

And we're in business.

We could be smarter and figure out more defaults, and generate some stub
quickcheck and haddock details. We could also init and create the
project in a darcs directory.

Comments, suggestions *and patches* welcome!

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


Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-19 Thread Chris Kuklewicz
Dougal Stanton wrote:
> Quoth Jason Dagit, nevermore,
>> Do we have any enthusiastic people to take this on?  I bet you could
>> have something usable in less than a days worth of hacking.
> 
> I'll give it a try. Of course I take this opportunity to solicit
> suggestions for a name for this application. Which is to say, what
> colour should my bike shed be? ;-)
> 
> D.


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


Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-19 Thread Dougal Stanton
Quoth Jason Dagit, nevermore,
> Do we have any enthusiastic people to take this on?  I bet you could
> have something usable in less than a days worth of hacking.

I'll give it a try. Of course I take this opportunity to solicit
suggestions for a name for this application. Which is to say, what
colour should my bike shed be? ;-)

D.
-- 
Dougal Stanton <[EMAIL PROTECTED]>

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


Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-19 Thread Jason Dagit

On 11/19/06, Dougal Stanton <[EMAIL PROTECTED]> wrote:

Quoth Donald Bruce Stewart, nevermore,
> P.S. It might even be useful to have a tool, haskell-project, which
> sets up all these files automatically.

I was wondering about that just the other day. Is there such an
application to interrogate the user about particulars and then create a
fully compliant *.cabal file?


I'm unaware of such a tool, but as far as UIs go, it should be fairly
straight forward.  It would be nice to have both a text mode and a GUI
version.  This would make an excellent project for someone just
starting in Haskell who wants to make life easier for everyone (a
great way to get some fame in the community).  I'm imagining the tool
looks at your darcs repository, asks you a few questions and then
generates a .cabal file.  Considering that the basic cabal file is
about 10 lines or less, not counting the list of source modules, it's
almost not worth writing.  On the other hand, even as simple as the
.cabal files are I always have to copy an existing one or check the
manual because I never can remember the exact syntax.  Which is how I
see this tool helping.

Do we have any enthusiastic people to take this on?  I bet you could
have something usable in less than a days worth of hacking.

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


Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-19 Thread Dougal Stanton
Quoth Donald Bruce Stewart, nevermore,
> P.S. It might even be useful to have a tool, haskell-project, which
> sets up all these files automatically.

I was wondering about that just the other day. Is there such an
application to interrogate the user about particulars and then create a
fully compliant *.cabal file?

D.

-- 
Dougal Stanton <[EMAIL PROTECTED]>

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