10import Rel8.Expr ( Expr )
11import Rel8.Expr.Null ( isNonNull, unsafeUnnullify )
12import Rel8.Query ( Query )
13import Rel8.Query.Filter ( where_ )
16-- | Filter a 'Query' that might return @null@ to a 'Query' without any
19-- Corresponds to 'Data.Maybe.catMaybes'.
21-- >>> select c $ pure (nullExpr :: Expr (Maybe Bool))
24-- >>> select c $ catNullable (nullExpr :: Expr (Maybe Bool))
27-- >>> select c $ catNullable (lit (Just True))
30-- Notice how in the last example a @Bool@ is returned (rather than @Maybe
33-- >>> :t catNullable (lit (Just True))
34-- catMaybe (lit (Just True)) :: Query (Expr Bool)
35catNullable :: Expr (Maybe a) -> Query (Expr a)
38 pure $ unsafeUnnullify a
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