{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Database.Beam.Backend.SQL.Types where import qualified Data.Aeson as Json import Data.Bits data SqlNull = SqlNull deriving (Int -> SqlNull -> ShowS [SqlNull] -> ShowS SqlNull -> String forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [SqlNull] -> ShowS $cshowList :: [SqlNull] -> ShowS show :: SqlNull -> String $cshow :: SqlNull -> String showsPrec :: Int -> SqlNull -> ShowS $cshowsPrec :: Int -> SqlNull -> ShowS Show, SqlNull -> SqlNull -> Bool forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a /= :: SqlNull -> SqlNull -> Bool $c/= :: SqlNull -> SqlNull -> Bool == :: SqlNull -> SqlNull -> Bool $c== :: SqlNull -> SqlNull -> Bool Eq, Eq SqlNull SqlNull -> SqlNull -> Bool SqlNull -> SqlNull -> Ordering SqlNull -> SqlNull -> SqlNull forall a. Eq a -> (a -> a -> Ordering) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> a) -> (a -> a -> a) -> Ord a min :: SqlNull -> SqlNull -> SqlNull $cmin :: SqlNull -> SqlNull -> SqlNull max :: SqlNull -> SqlNull -> SqlNull $cmax :: SqlNull -> SqlNull -> SqlNull >= :: SqlNull -> SqlNull -> Bool $c>= :: SqlNull -> SqlNull -> Bool > :: SqlNull -> SqlNull -> Bool $c> :: SqlNull -> SqlNull -> Bool <= :: SqlNull -> SqlNull -> Bool $c<= :: SqlNull -> SqlNull -> Bool < :: SqlNull -> SqlNull -> Bool $c< :: SqlNull -> SqlNull -> Bool compare :: SqlNull -> SqlNull -> Ordering $ccompare :: SqlNull -> SqlNull -> Ordering Ord, SqlNull forall a. a -> a -> Bounded a maxBound :: SqlNull $cmaxBound :: SqlNull minBound :: SqlNull $cminBound :: SqlNull Bounded, Int -> SqlNull SqlNull -> Int SqlNull -> [SqlNull] SqlNull -> SqlNull SqlNull -> SqlNull -> [SqlNull] SqlNull -> SqlNull -> SqlNull -> [SqlNull] forall a. (a -> a) -> (a -> a) -> (Int -> a) -> (a -> Int) -> (a -> [a]) -> (a -> a -> [a]) -> (a -> a -> [a]) -> (a -> a -> a -> [a]) -> Enum a enumFromThenTo :: SqlNull -> SqlNull -> SqlNull -> [SqlNull] $cenumFromThenTo :: SqlNull -> SqlNull -> SqlNull -> [SqlNull] enumFromTo :: SqlNull -> SqlNull -> [SqlNull] $cenumFromTo :: SqlNull -> SqlNull -> [SqlNull] enumFromThen :: SqlNull -> SqlNull -> [SqlNull] $cenumFromThen :: SqlNull -> SqlNull -> [SqlNull] enumFrom :: SqlNull -> [SqlNull] $cenumFrom :: SqlNull -> [SqlNull] fromEnum :: SqlNull -> Int $cfromEnum :: SqlNull -> Int toEnum :: Int -> SqlNull $ctoEnum :: Int -> SqlNull pred :: SqlNull -> SqlNull $cpred :: SqlNull -> SqlNull succ :: SqlNull -> SqlNull $csucc :: SqlNull -> SqlNull Enum) newtype SqlBitString = SqlBitString Integer deriving (Int -> SqlBitString -> ShowS [SqlBitString] -> ShowS SqlBitString -> String forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [SqlBitString] -> ShowS $cshowList :: [SqlBitString] -> ShowS show :: SqlBitString -> String $cshow :: SqlBitString -> String showsPrec :: Int -> SqlBitString -> ShowS $cshowsPrec :: Int -> SqlBitString -> ShowS Show, SqlBitString -> SqlBitString -> Bool forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a /= :: SqlBitString -> SqlBitString -> Bool $c/= :: SqlBitString -> SqlBitString -> Bool == :: SqlBitString -> SqlBitString -> Bool $c== :: SqlBitString -> SqlBitString -> Bool Eq, Eq SqlBitString SqlBitString -> SqlBitString -> Bool SqlBitString -> SqlBitString -> Ordering SqlBitString -> SqlBitString -> SqlBitString forall a. Eq a -> (a -> a -> Ordering) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> a) -> (a -> a -> a) -> Ord a min :: SqlBitString -> SqlBitString -> SqlBitString $cmin :: SqlBitString -> SqlBitString -> SqlBitString max :: SqlBitString -> SqlBitString -> SqlBitString $cmax :: SqlBitString -> SqlBitString -> SqlBitString >= :: SqlBitString -> SqlBitString -> Bool $c>= :: SqlBitString -> SqlBitString -> Bool > :: SqlBitString -> SqlBitString -> Bool $c> :: SqlBitString -> SqlBitString -> Bool <= :: SqlBitString -> SqlBitString -> Bool $c<= :: SqlBitString -> SqlBitString -> Bool < :: SqlBitString -> SqlBitString -> Bool $c< :: SqlBitString -> SqlBitString -> Bool compare :: SqlBitString -> SqlBitString -> Ordering $ccompare :: SqlBitString -> SqlBitString -> Ordering Ord, Int -> SqlBitString SqlBitString -> Int SqlBitString -> [SqlBitString] SqlBitString -> SqlBitString SqlBitString -> SqlBitString -> [SqlBitString] SqlBitString -> SqlBitString -> SqlBitString -> [SqlBitString] forall a. (a -> a) -> (a -> a) -> (Int -> a) -> (a -> Int) -> (a -> [a]) -> (a -> a -> [a]) -> (a -> a -> [a]) -> (a -> a -> a -> [a]) -> Enum a enumFromThenTo :: SqlBitString -> SqlBitString -> SqlBitString -> [SqlBitString] $cenumFromThenTo :: SqlBitString -> SqlBitString -> SqlBitString -> [SqlBitString] enumFromTo :: SqlBitString -> SqlBitString -> [SqlBitString] $cenumFromTo :: SqlBitString -> SqlBitString -> [SqlBitString] enumFromThen :: SqlBitString -> SqlBitString -> [SqlBitString] $cenumFromThen :: SqlBitString -> SqlBitString -> [SqlBitString] enumFrom :: SqlBitString -> [SqlBitString] $cenumFrom :: SqlBitString -> [SqlBitString] fromEnum :: SqlBitString -> Int $cfromEnum :: SqlBitString -> Int toEnum :: Int -> SqlBitString $ctoEnum :: Int -> SqlBitString pred :: SqlBitString -> SqlBitString $cpred :: SqlBitString -> SqlBitString succ :: SqlBitString -> SqlBitString $csucc :: SqlBitString -> SqlBitString Enum, Eq SqlBitString SqlBitString Int -> SqlBitString SqlBitString -> Bool SqlBitString -> Int SqlBitString -> Maybe Int SqlBitString -> SqlBitString SqlBitString -> Int -> Bool SqlBitString -> Int -> SqlBitString SqlBitString -> SqlBitString -> SqlBitString forall a. Eq a -> (a -> a -> a) -> (a -> a -> a) -> (a -> a -> a) -> (a -> a) -> (a -> Int -> a) -> (a -> Int -> a) -> a -> (Int -> a) -> (a -> Int -> a) -> (a -> Int -> a) -> (a -> Int -> a) -> (a -> Int -> Bool) -> (a -> Maybe Int) -> (a -> Int) -> (a -> Bool) -> (a -> Int -> a) -> (a -> Int -> a) -> (a -> Int -> a) -> (a -> Int -> a) -> (a -> Int -> a) -> (a -> Int -> a) -> (a -> Int) -> Bits a popCount :: SqlBitString -> Int $cpopCount :: SqlBitString -> Int rotateR :: SqlBitString -> Int -> SqlBitString $crotateR :: SqlBitString -> Int -> SqlBitString rotateL :: SqlBitString -> Int -> SqlBitString $crotateL :: SqlBitString -> Int -> SqlBitString unsafeShiftR :: SqlBitString -> Int -> SqlBitString $cunsafeShiftR :: SqlBitString -> Int -> SqlBitString shiftR :: SqlBitString -> Int -> SqlBitString $cshiftR :: SqlBitString -> Int -> SqlBitString unsafeShiftL :: SqlBitString -> Int -> SqlBitString $cunsafeShiftL :: SqlBitString -> Int -> SqlBitString shiftL :: SqlBitString -> Int -> SqlBitString $cshiftL :: SqlBitString -> Int -> SqlBitString isSigned :: SqlBitString -> Bool $cisSigned :: SqlBitString -> Bool bitSize :: SqlBitString -> Int $cbitSize :: SqlBitString -> Int bitSizeMaybe :: SqlBitString -> Maybe Int $cbitSizeMaybe :: SqlBitString -> Maybe Int testBit :: SqlBitString -> Int -> Bool $ctestBit :: SqlBitString -> Int -> Bool complementBit :: SqlBitString -> Int -> SqlBitString $ccomplementBit :: SqlBitString -> Int -> SqlBitString clearBit :: SqlBitString -> Int -> SqlBitString $cclearBit :: SqlBitString -> Int -> SqlBitString setBit :: SqlBitString -> Int -> SqlBitString $csetBit :: SqlBitString -> Int -> SqlBitString bit :: Int -> SqlBitString $cbit :: Int -> SqlBitString zeroBits :: SqlBitString $czeroBits :: SqlBitString rotate :: SqlBitString -> Int -> SqlBitString $crotate :: SqlBitString -> Int -> SqlBitString shift :: SqlBitString -> Int -> SqlBitString $cshift :: SqlBitString -> Int -> SqlBitString complement :: SqlBitString -> SqlBitString $ccomplement :: SqlBitString -> SqlBitString xor :: SqlBitString -> SqlBitString -> SqlBitString $cxor :: SqlBitString -> SqlBitString -> SqlBitString .|. :: SqlBitString -> SqlBitString -> SqlBitString $c.|. :: SqlBitString -> SqlBitString -> SqlBitString .&. :: SqlBitString -> SqlBitString -> SqlBitString $c.&. :: SqlBitString -> SqlBitString -> SqlBitString Bits) newtype SqlSerial a = SqlSerial { forall a. SqlSerial a -> a unSerial :: a } deriving (Int -> SqlSerial a -> ShowS forall a. Show a => Int -> SqlSerial a -> ShowS forall a. Show a => [SqlSerial a] -> ShowS forall a. Show a => SqlSerial a -> String forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [SqlSerial a] -> ShowS $cshowList :: forall a. Show a => [SqlSerial a] -> ShowS show :: SqlSerial a -> String $cshow :: forall a. Show a => SqlSerial a -> String showsPrec :: Int -> SqlSerial a -> ShowS $cshowsPrec :: forall a. Show a => Int -> SqlSerial a -> ShowS Show, ReadPrec [SqlSerial a] ReadPrec (SqlSerial a) ReadS [SqlSerial a] forall a. Read a => ReadPrec [SqlSerial a] forall a. Read a => ReadPrec (SqlSerial a) forall a. Read a => Int -> ReadS (SqlSerial a) forall a. Read a => ReadS [SqlSerial a] forall a. (Int -> ReadS a) -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a readListPrec :: ReadPrec [SqlSerial a] $creadListPrec :: forall a. Read a => ReadPrec [SqlSerial a] readPrec :: ReadPrec (SqlSerial a) $creadPrec :: forall a. Read a => ReadPrec (SqlSerial a) readList :: ReadS [SqlSerial a] $creadList :: forall a. Read a => ReadS [SqlSerial a] readsPrec :: Int -> ReadS (SqlSerial a) $creadsPrec :: forall a. Read a => Int -> ReadS (SqlSerial a) Read, SqlSerial a -> SqlSerial a -> Bool forall a. Eq a => SqlSerial a -> SqlSerial a -> Bool forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a /= :: SqlSerial a -> SqlSerial a -> Bool $c/= :: forall a. Eq a => SqlSerial a -> SqlSerial a -> Bool == :: SqlSerial a -> SqlSerial a -> Bool $c== :: forall a. Eq a => SqlSerial a -> SqlSerial a -> Bool Eq, SqlSerial a -> SqlSerial a -> Bool SqlSerial a -> SqlSerial a -> Ordering SqlSerial a -> SqlSerial a -> SqlSerial a forall a. Eq a -> (a -> a -> Ordering) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> a) -> (a -> a -> a) -> Ord a forall {a}. Ord a => Eq (SqlSerial a) forall a. Ord a => SqlSerial a -> SqlSerial a -> Bool forall a. Ord a => SqlSerial a -> SqlSerial a -> Ordering forall a. Ord a => SqlSerial a -> SqlSerial a -> SqlSerial a min :: SqlSerial a -> SqlSerial a -> SqlSerial a $cmin :: forall a. Ord a => SqlSerial a -> SqlSerial a -> SqlSerial a max :: SqlSerial a -> SqlSerial a -> SqlSerial a $cmax :: forall a. Ord a => SqlSerial a -> SqlSerial a -> SqlSerial a >= :: SqlSerial a -> SqlSerial a -> Bool $c>= :: forall a. Ord a => SqlSerial a -> SqlSerial a -> Bool > :: SqlSerial a -> SqlSerial a -> Bool $c> :: forall a. Ord a => SqlSerial a -> SqlSerial a -> Bool <= :: SqlSerial a -> SqlSerial a -> Bool $c<= :: forall a. Ord a => SqlSerial a -> SqlSerial a -> Bool < :: SqlSerial a -> SqlSerial a -> Bool $c< :: forall a. Ord a => SqlSerial a -> SqlSerial a -> Bool compare :: SqlSerial a -> SqlSerial a -> Ordering $ccompare :: forall a. Ord a => SqlSerial a -> SqlSerial a -> Ordering Ord, Integer -> SqlSerial a SqlSerial a -> SqlSerial a SqlSerial a -> SqlSerial a -> SqlSerial a forall a. Num a => Integer -> SqlSerial a forall a. Num a => SqlSerial a -> SqlSerial a forall a. Num a => SqlSerial a -> SqlSerial a -> SqlSerial a forall a. (a -> a -> a) -> (a -> a -> a) -> (a -> a -> a) -> (a -> a) -> (a -> a) -> (a -> a) -> (Integer -> a) -> Num a fromInteger :: Integer -> SqlSerial a $cfromInteger :: forall a. Num a => Integer -> SqlSerial a signum :: SqlSerial a -> SqlSerial a $csignum :: forall a. Num a => SqlSerial a -> SqlSerial a abs :: SqlSerial a -> SqlSerial a $cabs :: forall a. Num a => SqlSerial a -> SqlSerial a negate :: SqlSerial a -> SqlSerial a $cnegate :: forall a. Num a => SqlSerial a -> SqlSerial a * :: SqlSerial a -> SqlSerial a -> SqlSerial a $c* :: forall a. Num a => SqlSerial a -> SqlSerial a -> SqlSerial a - :: SqlSerial a -> SqlSerial a -> SqlSerial a $c- :: forall a. Num a => SqlSerial a -> SqlSerial a -> SqlSerial a + :: SqlSerial a -> SqlSerial a -> SqlSerial a $c+ :: forall a. Num a => SqlSerial a -> SqlSerial a -> SqlSerial a Num, SqlSerial a -> Integer SqlSerial a -> SqlSerial a -> (SqlSerial a, SqlSerial a) SqlSerial a -> SqlSerial a -> SqlSerial a forall {a}. Integral a => Enum (SqlSerial a) forall {a}. Integral a => Real (SqlSerial a) forall a. Integral a => SqlSerial a -> Integer forall a. Integral a => SqlSerial a -> SqlSerial a -> (SqlSerial a, SqlSerial a) forall a. Integral a => SqlSerial a -> SqlSerial a -> SqlSerial a forall a. Real a -> Enum a -> (a -> a -> a) -> (a -> a -> a) -> (a -> a -> a) -> (a -> a -> a) -> (a -> a -> (a, a)) -> (a -> a -> (a, a)) -> (a -> Integer) -> Integral a toInteger :: SqlSerial a -> Integer $ctoInteger :: forall a. Integral a => SqlSerial a -> Integer divMod :: SqlSerial a -> SqlSerial a -> (SqlSerial a, SqlSerial a) $cdivMod :: forall a. Integral a => SqlSerial a -> SqlSerial a -> (SqlSerial a, SqlSerial a) quotRem :: SqlSerial a -> SqlSerial a -> (SqlSerial a, SqlSerial a) $cquotRem :: forall a. Integral a => SqlSerial a -> SqlSerial a -> (SqlSerial a, SqlSerial a) mod :: SqlSerial a -> SqlSerial a -> SqlSerial a $cmod :: forall a. Integral a => SqlSerial a -> SqlSerial a -> SqlSerial a div :: SqlSerial a -> SqlSerial a -> SqlSerial a $cdiv :: forall a. Integral a => SqlSerial a -> SqlSerial a -> SqlSerial a rem :: SqlSerial a -> SqlSerial a -> SqlSerial a $crem :: forall a. Integral a => SqlSerial a -> SqlSerial a -> SqlSerial a quot :: SqlSerial a -> SqlSerial a -> SqlSerial a $cquot :: forall a. Integral a => SqlSerial a -> SqlSerial a -> SqlSerial a Integral, SqlSerial a -> Rational forall a. Num a -> Ord a -> (a -> Rational) -> Real a forall {a}. Real a => Num (SqlSerial a) forall {a}. Real a => Ord (SqlSerial a) forall a. Real a => SqlSerial a -> Rational toRational :: SqlSerial a -> Rational $ctoRational :: forall a. Real a => SqlSerial a -> Rational Real, Int -> SqlSerial a SqlSerial a -> Int SqlSerial a -> [SqlSerial a] SqlSerial a -> SqlSerial a SqlSerial a -> SqlSerial a -> [SqlSerial a] SqlSerial a -> SqlSerial a -> SqlSerial a -> [SqlSerial a] forall a. Enum a => Int -> SqlSerial a forall a. Enum a => SqlSerial a -> Int forall a. Enum a => SqlSerial a -> [SqlSerial a] forall a. Enum a => SqlSerial a -> SqlSerial a forall a. Enum a => SqlSerial a -> SqlSerial a -> [SqlSerial a] forall a. Enum a => SqlSerial a -> SqlSerial a -> SqlSerial a -> [SqlSerial a] forall a. (a -> a) -> (a -> a) -> (Int -> a) -> (a -> Int) -> (a -> [a]) -> (a -> a -> [a]) -> (a -> a -> [a]) -> (a -> a -> a -> [a]) -> Enum a enumFromThenTo :: SqlSerial a -> SqlSerial a -> SqlSerial a -> [SqlSerial a] $cenumFromThenTo :: forall a. Enum a => SqlSerial a -> SqlSerial a -> SqlSerial a -> [SqlSerial a] enumFromTo :: SqlSerial a -> SqlSerial a -> [SqlSerial a] $cenumFromTo :: forall a. Enum a => SqlSerial a -> SqlSerial a -> [SqlSerial a] enumFromThen :: SqlSerial a -> SqlSerial a -> [SqlSerial a] $cenumFromThen :: forall a. Enum a => SqlSerial a -> SqlSerial a -> [SqlSerial a] enumFrom :: SqlSerial a -> [SqlSerial a] $cenumFrom :: forall a. Enum a => SqlSerial a -> [SqlSerial a] fromEnum :: SqlSerial a -> Int $cfromEnum :: forall a. Enum a => SqlSerial a -> Int toEnum :: Int -> SqlSerial a $ctoEnum :: forall a. Enum a => Int -> SqlSerial a pred :: SqlSerial a -> SqlSerial a $cpred :: forall a. Enum a => SqlSerial a -> SqlSerial a succ :: SqlSerial a -> SqlSerial a $csucc :: forall a. Enum a => SqlSerial a -> SqlSerial a Enum) instance Json.FromJSON a => Json.FromJSON (SqlSerial a) where parseJSON :: Value -> Parser (SqlSerial a) parseJSON Value a = forall a. a -> SqlSerial a SqlSerial forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> forall a. FromJSON a => Value -> Parser a Json.parseJSON Value a instance Json.ToJSON a => Json.ToJSON (SqlSerial a) where toJSON :: SqlSerial a -> Value toJSON (SqlSerial a a) = forall a. ToJSON a => a -> Value Json.toJSON a a toEncoding :: SqlSerial a -> Encoding toEncoding (SqlSerial a a) = forall a. ToJSON a => a -> Encoding Json.toEncoding a a