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.Internal.MaybeFields

  • 2 types
  • 31 values
  • Packageopaleye-0.10.8.0
  • Exports33
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceMaybeFields.hs
datadata MaybeFields fields
#

The Opaleye analogue of Maybe. A value of type MaybeFields a either contains a value of type a, or it contains nothing.

Instances12Monad, Functor, Applicative, Default, …
valuematchMaybe :: Default IfPP b b => MaybeFields a -> (Maybe a -> b) -> b
#

Use a Haskell \case expression to pattern match on a MaybeFields.

example :: MaybeFields (Field SqlInt4) -> Field SqlInt4
example mf = matchMaybe mf $ \case
  Nothing -> 0
  Just x  -> x * 100
newtypenewtype WithNulls (p :: Type -> Type -> Type) a b
#

Constructors

Instances6Profunctor, ProductProfunctor, SumProfunctor, Default, Functor, Applicative

Orphan instances

1 instance