haskell-beam/beam

[Suggestions Please] Thoughts on how beam could better support testing

Aperta

#216 aperta il 12 apr 2018

 (3 commenti) (1 reazione) (0 assegnatari)Haskell (191 fork)auto 404
enhancementhelp wanted

Metriche repository

Star
 (631 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Lately, I've been thinking of how beam could support testing. Beam offers several guarantees that make it easy to compose queries. The Q monad can very reliably be assumed to work like the [] monad, but the [] monad is not always super intuitive. Moreover, something being easy doesn't mean we can neglect testing.

Libraries like quickcheck make it easy to test properties in Haskell. I'm wondering if something similar could be done for beam, to make sure that our queries return the right things.

The nice thing about having this is that we could unit test small queries, and once these are verified to return the right results, we should be able to feel free to combine these queries using beam combinators without worry.

Any suggestions or insight would be appreciated.

Guida contributor