What did you/do you find hard/dislike about Opaleye?

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

On Mon, Oct 24, 2016 at 11:06 PM, Tom Ellis < tom-lists-haskell-cafe-2013@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

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-haskell-cafe-2013@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/Def... Does that help you understand what's going on behind Default? Is there still something missing that could help your understanding? Tom

On Tue, Oct 25, 2016 at 12:56 PM Tom Ellis < tom-lists-haskell-cafe-2013@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/Def...
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
participants (2)
-
Oliver Charles
-
Tom Ellis