[Haskell-cafe] RE: module names

Scherrer, Chad Chad.Scherrer at pnl.gov
Thu Dec 29 22:41:22 EST 2005

Yes, good point. I suppose there's really no need to re-declare main once it's been imported. Thanks!

-----Original Message-----
From: Remi Turk [mailto:rturk at science.uva.nl]
Sent: Thu 12/29/2005 4:34 PM
To: Scherrer, Chad
Cc: S Koray Can; haskell-cafe at haskell.org
Subject: Re: [Haskell-cafe] RE: module names
On Fri, Dec 16, 2005 at 07:55:50AM -0800, Scherrer, Chad wrote:
> From: S Koray Can [mailto:skoraycan at aim.com]
> Why not do this: name none of those modules Main.hs, and have an empty 
> module Main.hs with only "import MainDeJour" and "main = 
> MainDeJour.main" so you can just edit just that file.
> Cheers,
> Koray
> ----------------------------------------------------------------------
> Yeah, I like that approach. That saves me from having to remember which 
> file I most recent used as main. Seems easy enough to even set it up so
> that
> load MainDuJour
> writes the file Main.hs with
> import MainDuJour
> main = MainDuJour.main

A rather late reply I realize, but this slightly less verbose
version also works:

> module Main where
> import MainDuJour


More information about the Haskell-Cafe mailing list