Commit Graph

12 Commits

Author SHA1 Message Date
Felipe Lessa
531ca905fd Steal code from rawSql and stop using it.
Unfortunately we can't use rawSql, since we need explicit control
of the SELECT (i.e. we can't use "??").
2012-09-03 18:43:17 -03:00
Felipe Lessa
2986d0996e Nicer 'from' interface.
Instead of

  select $ do
    (x,y,z) <- from
    where_ (z^.f ==. y^.f)
    return (x, y^.f, z)

now you may write

  select $
  from $ \(x,y,z) -> do
    where_ (z^.f ==. y^.f)
    return (x, y^.f, z)

Now the only difference in reading order wrt. SQL is the return
on the bottom of the expression. =)

Note that this does not change at all the expressivity of the
language since

  oldFrom = from return
2012-09-03 17:03:07 -03:00
Felipe Lessa
5bdac55e90 Remove test code from Esqueleto.hs. 2012-09-03 17:02:49 -03:00
Felipe Lessa
3330e6c4ee Doc improvements. 2012-09-03 16:39:01 -03:00
Felipe Lessa
dd417a98e2 Some package re-exports from Esqueleto. 2012-09-03 16:26:42 -03:00
Felipe Lessa
b189791dc3 Use fundeps on SqlSelect.
This allows GHC to infer the type of from by the return of
select.
2012-09-03 16:26:02 -03:00
Felipe Lessa
33d04d5f27 Implement sub. 2012-09-03 15:57:20 -03:00
Felipe Lessa
fe7a32e7e4 Pass escaping function as argument to ERaw (instead of Connection). 2012-09-03 15:53:38 -03:00
Felipe Lessa
a4bd0268aa Change ERaw, more dependent on Connection. 2012-09-03 15:51:12 -03:00
Felipe Lessa
aba36832f6 Second prototype, now using finally tagless style. 2012-09-03 15:42:28 -03:00
Felipe Lessa
acc119e61f Initial skeleton. 2012-09-03 11:38:22 -03:00
Felipe Lessa
c9edc9178e Initial commit. 2012-09-03 09:18:39 -03:00