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

10 views
Skip to first unread message

Tom Ellis

unread,
Oct 24, 2016, 6:06:29 PM10/24/16
to Haskell Café List
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'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!

Feel free to contact me privately or reply directly. Many thanks.

Tom
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

Oliver Charles

unread,
Oct 25, 2016, 7:49:24 AM10/25/16
to Tom Ellis, Haskell Café List
On Mon, Oct 24, 2016 at 11:06 PM, Tom Ellis <tom-lists-has...@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

Tom Ellis

unread,
Oct 25, 2016, 7:56:21 AM10/25/16
to Haskell Café List
On Tue, Oct 25, 2016 at 12:49:13PM +0100, Oliver Charles wrote:
> On Mon, Oct 24, 2016 at 11:06 PM, Tom Ellis <
> tom-lists-has...@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.

Hi Ollie,

Thanks for the feedback. Have you read the "Default Explanation" document?

https://github.com/tomjaguarpaw/haskell-opaleye/blob/master/Doc/Tutorial/DefaultExplanation.lhs

Does that help you understand what's going on behind Default? Is there
still something missing that could help your understanding?

Oliver Charles

unread,
Oct 25, 2016, 8:30:06 AM10/25/16
to Tom Ellis, Haskell Café List
On Tue, Oct 25, 2016 at 12:56 PM Tom Ellis <tom-lists-has...@jaguarpaw.co.uk> wrote:
Hi Ollie,

Thanks for the feedback.  Have you read the "Default Explanation" document?

    https://github.com/tomjaguarpaw/haskell-opaleye/blob/master/Doc/Tutorial/DefaultExplanation.lhs

Does that help you understand what's going on behind Default?  Is there
still something missing that could help your understanding?

Hi,

I wasn't aware of this documentation, which I suppose is another point - there the should be a central location for complete documentation. For me, I expect everything relevant to be linked from the top-level module on Hackage (Opaleye, in this case).

- ocharles
Reply all
Reply to author
Forward
0 new messages