1{-# language DataKinds #-}
2{-# language FlexibleContexts #-}
3{-# language FlexibleInstances #-}
4{-# language MultiParamTypeClasses #-}
5{-# language StandaloneKindSignatures #-}
6{-# language TypeFamilies #-}
7{-# language UndecidableInstances #-}
10 ( DBNum, DBIntegral, DBFractional
15import Data.Int ( Int16, Int32, Int64 )
16import Data.Kind ( Constraint, Type )
20import Rel8.Schema.Nullability ( HasNullability, Unnullify, Sql )
21import Rel8.Type ( DBType )
24import Data.Scientific ( Scientific )
27-- | The class of database types that support the @+@, @*@, @-@ operators, and
28-- the @abs@, @negate@, @sign@ functions.
29type DBNum :: Type -> Constraint
30class DBType a => DBNum a
36instance DBNum Scientific
39instance {-# INCOHERENT #-} (HasNullability a, DBNum (Unnullify a)) =>
43-- | The class of database types that can be coerced to from integral
44-- expressions. This is a Rel8 concept, and allows us to provide
46type DBIntegral :: Type -> Constraint
47class DBNum a => DBIntegral a
48instance DBIntegral Int16
49instance DBIntegral Int32
50instance DBIntegral Int64
53instance {-# INCOHERENT #-} (HasNullability a, DBIntegral (Unnullify a)) =>
57-- | The class of database types that support the @/@ operator.
58class DBNum a => DBFractional a
59instance DBFractional Float
60instance DBFractional Double
61instance DBFractional Scientific
64instance {-# INCOHERENT #-} (HasNullability a, DBFractional (Unnullify 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