[Haskell-cafe] What did you/do you find hard/dislike about Opaleye?

Oliver Charles ollie at ocharles.org.uk
Tue Oct 25 11:49:13 UTC 2016


On Mon, Oct 24, 2016 at 11:06 PM, Tom Ellis <
tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk> wrote:

> I'm planning to update and refresh Opaleye's documentation and add some new
> functionality for common use cases. To help with this I'd like to request
> input from anyone who has ever tried the library.
>
> Specifically, what do you (or did you) find hard about using Opaleye and
> what did you dislike about it? If you tried it and gave up, what was the
> major sticking point?
>

I dislike the whole `Default` type class stuff and have a very hard time
reasoning about what is going on behind it. I understand it's basically
creating "n-ary structures" (the description is as vague as my
understanding), but I still struggle with it. My preference here is
specific type classes for the operations that need constraints on what a
table is (which could be derived generically on base data types).

Worse, the lack of type inference on left joins is an absolute killer.
Knowing that my application will ultimately need a left join at some point
makes me very uneasy about introducing Opaleye, because I just know how
frustrating it's going to be when I get to that point.

I dislike the need for arrows (and lets be honest, it really is a need -
using just functor/applicative/category leads to even less readable code),
but as we both know - no one has found a viable alternative yet.


> I'm already aware that many people dislike the boilerplate involved in
> defining your tables and types, and the polymorphic products are
> particularly uncomfortable for some. You don't need to mention these issues
> unless you particularly want to!
>

I do want to, because they prevent me from using the library as is.
Instead, I use it as an implementation layer and have to roll my own API on
top.

I hope this is constructive, I don't intend this to be just a rant. I am
still using Opaleye, in spite of these issues!
- ocharles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20161025/19eca46c/attachment.html>


More information about the Haskell-Cafe mailing list