1{-# language DerivingVia #-}
2{-# language GeneralizedNewtypeDeriving #-}
3{-# language StandaloneKindSignatures #-}
11import Data.Kind ( Type )
15import qualified Opaleye.Select as Opaleye
18import Rel8.Query.Set ( unionAll )
19import Rel8.Query.Values ( values )
20import Rel8.Table.Alternative
22 , AlternativeTable, emptyTable
26import Data.Functor.Apply ( Apply, WrappedApplicative(..) )
27import Data.Functor.Bind ( Bind, (>>-) )
30-- | The @Query@ monad allows you to compose a @SELECT@ query. This monad has
31-- semantics similar to the list (@[]@) monad.
32type Query :: Type -> Type
33newtype Query a = Query (Opaleye.Select a)
34 deriving newtype (Functor, Applicative, Monad)
35 deriving Apply via (WrappedApplicative Opaleye.Select)
38instance Bind Query where
42-- | '<|>:' = 'unionAll'.
43instance AltTable Query where
47-- | 'emptyTable' = 'values' @[]@.
48instance AlternativeTable Query where
49 emptyTable = values []
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list