1{-# language FlexibleContexts #-}
2{-# language StandaloneKindSignatures #-}
3{-# language TypeFamilies #-}
5module Rel8.Table.Alternative
7 , AlternativeTable ( emptyTable )
12import Data.Kind ( Constraint, Type )
16import Rel8.Expr ( Expr )
17import Rel8.Table ( Table )
20-- | Like 'Alt' in Haskell. This class is purely a Rel8 concept, and allows you
21-- to take a choice between two tables. See also 'AlternativeTable'.
23-- For example, using '<|>:' on 'MaybeTable' allows you to combine two tables
24-- and to return the first one that is a "just" MaybeTable.
25type AltTable :: (Type -> Type) -> Constraint
27 -- | An associative binary operation on 'Table's.
28 (<|>:) :: Table Expr a => f a -> f a -> f a
32-- | Like 'Alternative' in Haskell, some 'Table's form a monoid on applicative
34type AlternativeTable :: (Type -> Type) -> Constraint
35class AltTable f => AlternativeTable f where
36 -- | The identity of '<|>:'.
37 emptyTable :: Table Expr a => f 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