Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Where do you put your tests? (damodar kulkarni)
   2.  automatically clean up Haskell code? (Christopher Howard)
   3. Re:  automatically clean up Haskell code? (Karol Samborski)


----------------------------------------------------------------------

Message: 1
Date: Thu, 19 Jul 2012 18:57:10 +0530
From: damodar kulkarni <[email protected]>
Subject: Re: [Haskell-beginners] Where do you put your tests?
To: Lorenzo Bolla <[email protected]>
Cc: [email protected]
Message-ID:
        <CAD5HsyoxG8JD9_002nuTUbA=3Q3AOJFE3HTVkF7B4Z_2Q=+d...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

> Good because library dependencies are reduced, but bad because tests are
> somewhat "disconnected" from the functions they are testing.


AFAIK, it's a good engineering practice to separate the tests from the code
they are supposed to test. Code management issues will be there, but those
can be taken care with the help of cabal like tool.
That way, a person who wants to test will use the test-files and the one
who doesn't want will be spared the trouble of separating tests from the
intended function code.

Regards,
 Damodar


On Thu, Jul 19, 2012 at 1:46 PM, Lorenzo Bolla <[email protected]> wrote:

> Hi all,
>
> I'm writing some library code and I have hunit-tests and quickcheck-tests.
> I'm facing the problem of where to put these tests. These are the options I
> can think of:
>
>    - Put the tests for a function in the same file where the function is
>    defined. This is good because tests are close to the code being tested and
>    work as a sort of documentation for it. But it's bad because the file
>    requires HUnit, QuickCheck, Test.Framework, etc. to compile.
>    - Same as above, but use some sort of preprocessing flag to ignore the
>    Test suite when compiling the library (hence no dependencies on test
>    libraries), but leave the code in place. No dependencies, but ugly.
>    - Put the tests in completely separate files. Good because library
>    dependencies are reduced, but bad because tests are somewhat "disconnected"
>    from the functions they are testing.
>
> What do you expert suggest? How should I organize my test suites?
> (The same conundrum applies to benchmarking code.)
>
> Thanks,
> Lorenzo
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120719/4058cde5/attachment-0001.htm>

------------------------------

Message: 2
Date: Thu, 19 Jul 2012 18:19:36 -0800
From: Christopher Howard <[email protected]>
Subject: [Haskell-beginners] automatically clean up Haskell code?
To: Haskell Beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Is there a program that can automatically clean up your Haskell code?
That is, shrink to 80 columns, make tidy indentation, remove unnecessary
whitespace, and all that sort of stuff...?

-- 
frigidcode.com
indicium.us

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120719/2ec3679a/attachment-0001.pgp>

------------------------------

Message: 3
Date: Fri, 20 Jul 2012 09:24:09 +0200
From: Karol Samborski <[email protected]>
Subject: Re: [Haskell-beginners] automatically clean up Haskell code?
To: Christopher Howard <[email protected]>
Cc: Haskell Beginners <[email protected]>
Message-ID:
        <cace2dtuges_j94phmjfoa0yda9frht03q27ophogcudatmt...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

2012/7/20 Christopher Howard <[email protected]>:
> Is there a program that can automatically clean up your Haskell code?
> That is, shrink to 80 columns, make tidy indentation, remove unnecessary
> whitespace, and all that sort of stuff...?
>

Vim, emacs?

Best,
Regards



------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 49, Issue 23
*****************************************

Reply via email to