haskell-beam/beam

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

Open

#216 opened on Apr 12, 2018

 (3 comments) (1 reaction) (0 assignees)Haskell (191 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (631 stars)
PR merge metrics
 (PR metrics pending)

Description

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.

Contributor guide