haskell-relational-record/doc/slide/haskell-hackathon-201412/opaleye/e.hs
2014-12-21 16:16:54 +09:00

17 lines
361 B
Haskell

{-# LANGUAGE Arrows #-}
import Control.Arrow
import Opaleye
import Person
import Birthday
import qualified Person
import qualified Birthday
personAndBirthday :: Query (PersonColumn, BirthdayColumn)
personAndBirthday = proc () -> do
p <- personQuery -< ()
b <- birthdayQuery -< ()
restrict -< Person.name p .== Birthday.name b
returnA -< (p, b)