Open parsonsmatt opened 3 years ago
A coworker had a bug where they wrote:
from $ Table @Foo `InnerJoin` Table @Bar `on` ( \(foo, bar) -> foo ^. FooId ==. bar ^. BarFooId )
The error was pretty gnarly.
Could not deduce (Database.Esqueleto.Experimental.ToInnerJoin Database.Esqueleto.Experimental.NotLateral (E.From (E.SqlExpr (Entity Foo))) (E.From (E.SqlExpr (Entity Bar))) (E.SqlExpr (Entity Foo), E.SqlExpr (Entity Bar)))
If we had a type error instance with ToInnerJoin a b c (d, e) then we may be able to provide a better error mesage.
ToInnerJoin a b c (d, e)
Probably don't want that at the ToInnerJoin level but rather at the ToFrom level no? Also the lower case version probably has a better error.
A coworker had a bug where they wrote:
The error was pretty gnarly.
If we had a type error instance with
ToInnerJoin a b c (d, e)
then we may be able to provide a better error mesage.