1{-# language FlexibleContexts #-}
2{-# language FlexibleInstances #-}
3{-# language MultiParamTypeClasses #-}
4{-# language StandaloneKindSignatures #-}
5{-# language TypeFamilies #-}
6{-# language UndecidableInstances #-}
14import Data.Kind ( Type )
18import Rel8.Expr ( Expr, Col(..) )
19import Rel8.Expr.Array ( sappend, sempty )
20import Rel8.Schema.HTable.List ( HListTable )
21import Rel8.Schema.HTable.Vectorize ( happend, hempty )
22import Rel8.Table ( Table, Context, Columns, fromColumns, toColumns )
23import Rel8.Table.Alternative
25 , AlternativeTable, emptyTable
27import Rel8.Table.Recontextualize ( Recontextualize )
30-- | A @ListTable@ value contains zero or more instances of @a@. You construct
31-- @ListTable@s with 'many' or 'listAgg'.
32type ListTable :: Type -> Type
33newtype ListTable a = ListTable (HListTable (Columns a) (Col (Context a)))
36instance Table context a => Table context (ListTable a) where
37 type Columns (ListTable a) = HListTable (Columns a)
38 type Context (ListTable a) = Context a
40 fromColumns = ListTable
41 toColumns (ListTable a) = a
44instance Recontextualize from to a b =>
45 Recontextualize from to (ListTable a) (ListTable b)
48instance AltTable ListTable where
52instance AlternativeTable ListTable where
56instance Table Expr a => Semigroup (ListTable a) where
57 ListTable as <> ListTable bs = ListTable $
58 happend (\_ _ (DB a) (DB b) -> DB (sappend a b)) as bs
61instance Table Expr a => Monoid (ListTable a) where
62 mempty = ListTable $ hempty $ \nullability info ->
63 DB (sempty nullability info)
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