1{-# language FlexibleContexts #-}
13import Rel8.Expr ( Expr )
14import Rel8.Expr.Null ( isNonNull, unsafeUnnullify )
15import Rel8.Table ( Table )
16import Rel8.Table.Null ( NullTable, isNonNullTable, unsafeUnnullifyTable )
17import Rel8.Query ( Query )
18import Rel8.Query.Filter ( where_ )
21-- | Filter a 'Query' that might return @null@ to a 'Query' without any
24-- Corresponds to 'Data.Maybe.catMaybes'.
25catNull :: Expr (Maybe a) -> Query (Expr a)
28 pure $ unsafeUnnullify a
31-- | Filter a 'Query' that might return @nullTable@ to a 'Query' without any
34-- Corresponds to 'Data.Maybe.catMaybes'.
35catNullTable :: Table Expr a => NullTable Expr a -> Query a
37 where_ $ isNonNullTable a
38 pure $ unsafeUnnullifyTable 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