prowdsponsor/esqueleto — pull request #73 by rehno-lindeque (2014-09-05 11:38:04+00:00)
Title: Return the Source directly from selectSource and selectDistinctSource

`selectSource` in esqueleto differs from `selectSource` in persistent in that persistent returns the conduit directly as `Source m (Entity val)` whereas esqueleto wraps it a second time in the underlying monad `m (Source m r)`. This leads to quite a lot of awkwardness and allows you to do some really strange things like this:

```haskell
do
source <- runDB mySelectFunction
runDB (source $$ CL.consume) -- The type encourages us to erroneously call runDB a second time
```

I don't see any obvious reason for the second wrapper in the source code, perhaps it is just a mistake? I've accidentally tried to return my conduits wrapped up by the underlying monad myself.