1{-# language DataKinds #-}
2{-# language FlexibleContexts #-}
3{-# language FlexibleInstances #-}
4{-# language OverloadedStrings #-}
5{-# language StandaloneKindSignatures #-}
6{-# language TypeFamilies #-}
7{-# language UndecidableInstances #-}
10 ( DBMonoid( memptyExpr )
15import Data.Kind ( Constraint, Type )
16import Prelude hiding ( null )
19import Data.ByteString ( ByteString )
20import qualified Data.ByteString.Lazy as Lazy ( ByteString )
23import Data.CaseInsensitive ( CI )
26import {-# SOURCE #-} Rel8.Expr ( Expr )
27import Rel8.Expr.Array ( sempty )
28import Rel8.Expr.Serialize ( litExpr )
29import Rel8.Schema.Nullability ( Nullabilizes, nullabilization )
30import Rel8.Type ( DBType, typeInformation )
31import Rel8.Type.Semigroup ( DBSemigroup )
34import Data.Text ( Text )
35import qualified Data.Text.Lazy as Lazy ( Text )
38import Data.Time.Clock ( DiffTime, NominalDiffTime )
41type DBMonoid :: Type -> Constraint
42class DBSemigroup a => DBMonoid a where
46instance (DBType db, Nullabilizes db a) => DBMonoid [a] where
47 memptyExpr = sempty nullabilization typeInformation
50instance DBMonoid DiffTime where
51 memptyExpr = litExpr 0
54instance DBMonoid NominalDiffTime where
55 memptyExpr = litExpr 0
58instance DBMonoid Text where
59 memptyExpr = litExpr ""
62instance DBMonoid Lazy.Text where
63 memptyExpr = litExpr ""
66instance DBMonoid (CI Text) where
67 memptyExpr = litExpr ""
70instance DBMonoid (CI Lazy.Text) where
71 memptyExpr = litExpr ""
74instance DBMonoid ByteString where
75 memptyExpr = litExpr ""
78instance DBMonoid Lazy.ByteString where
79 memptyExpr = litExpr ""
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