HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

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.

Contents
  1. Binary operations
  2. Explicit versions
  3. Adaptors
Synopsis
  • Packageopaleye-0.10.8.0
  • Exports13
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceBinary.hs

Binary operations

Explicit versions

Adaptors