HORIZON HASKELLDocslts/ghc-10.0.x8c2f8e82026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Moduleopaleye-0.10.8.0Haskell2010

Opaleye.Binary

Binary relational operations on Selects, that is, operations which take two Selects as arguments and return a single Select.

All the binary relational operations have the same type specializations. For example:

unionAll :: S.Select (Field a, Field b)
         -> S.Select (Field a, Field b)
         -> S.Select (Field a, Field b)

Assuming the makeAdaptorAndInstanceInferrable splice has been run for the product type Foo:

unionAll :: S.Select (Foo (Field a) (Field b) (Field c))
         -> S.Select (Foo (Field a) (Field b) (Field c))
         -> S.Select (Foo (Field a) (Field b) (Field c))

If you want to run a binary relational operator on SelectArrs you should apply Opaleye.Lateral.bilaterally to it, for example

Opaleye.Lateral.bilaterally union
  :: Data.Profunctor.Product.Default Binaryspec fields fields
  => SelectArr i fields -> SelectArr i fields -> SelectArr i fields

unionAll is very close to being the <|> operator of a Control.Applicative.Alternative instance but it fails to work only because of the typeclass constraint it has.

  • 13 values
  • Packageopaleye-0.10.8.0
  • Exports13
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceBinary.hs

Binary operations

6 declarations

Explicit versions

6 declarations

Adaptors

1 declaration