[Haskell-beginners] Trouble with formatting, Real World Haskell example

Robert Kosara rkosara at gmail.com
Mon Nov 24 09:56:44 EST 2008


Kurt,
  that's a good idea, that also groups the elements in the where much
better.

  Thanks everybody for your responses (I don't think I've responded to the
list so far).


Regards,

Robert

On Mon, Nov 24, 2008 at 9:23 AM, Kurt Hutchinson <kelanslists at gmail.com>wrote:

> On Sun, Nov 23, 2008 at 12:10 AM, Steven Ashley
> <steven.e.ashley at gmail.com> wrote:
> > The contents of the do block must be indented at-least as much as
> > mainWith on the previous line.
>
> > main = mainWith myFunction
> > ....where mainWith function = do
> > ....................args <- getArgs
>
>
> This is the reason that I format 'where' clauses like so:
>
> main = mainWith myFunction
> ....where
> ....mainWith f = do
> ........args <- getArgs
>
> etc. I think one more line of vertical space is worth all of the
> horizontal space you end up saving.
>
> Kurt
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20081124/89b1be3f/attachment.htm


More information about the Beginners mailing list