[Haskell-cafe] HSpec vs Doctest for TDD
spam at scientician.net
Wed Jun 25 16:28:27 UTC 2014
On 2014-06-24 22:55, Gautier DI FOLCO wrote:
> Hi all,
> I'm a huge fan of TDD (Test-Driven Development) et I used to use tools such
> as RSpec (Ruby). So naturally, I looked to HSpec, but it seems not
> idiomatic in Haskell.
> I have a bunch of questions:
> - Do you do TDD?
> - Which tools do you use?
> - Is doctest "better" (in some senses) than HSpec? Why?
> - Are HSpec and Doctest complementary? If so, in which case do you use one
> or another?
> - Is there some Haskell-specific good practices do to TDD?
> Thanks in advance for your lights.
I suspect most people practice "the other TDD", namely *Type*-Directed
At its most basic you just start by writing out all the type signatures
(and type classes and whatnot) that you expect everything to have with
"undefined" as the body of the functions.
Then you just fill in the "undefined"s.
More information about the Haskell-Cafe