File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
source/library/Database/PostgreSQL/Simple/Interval Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ library
6464 build-depends :
6565 persistent ^>= 2.17 ,
6666 scientific ^>= 0.3.8 ,
67+ template-haskell >= 2.15 && < 2.24 ,
6768 text >= 1.2.4 && < 1.3 || >= 2.0 && < 2.2 ,
6869
6970 -- cabal-gild: discover source/library
Original file line number Diff line number Diff line change 11{-# LANGUAGE DataKinds #-}
2+ {-# LANGUAGE DeriveLift #-}
23{-# LANGUAGE NumDecimals #-}
34{-# LANGUAGE OverloadedStrings #-}
45{-# LANGUAGE ScopedTypeVariables #-}
@@ -27,6 +28,7 @@ import qualified Database.PostgreSQL.Simple.FromField as Postgres
2728import qualified Database.PostgreSQL.Simple.ToField as Postgres
2829import qualified Database.PostgreSQL.Simple.TypeInfo.Static as Postgres
2930import qualified GHC.TypeLits as TypeLits
31+ import qualified Language.Haskell.TH.Syntax as TH
3032
3133-- | This type represents a PostgreSQL interval. Intervals can have month, day,
3234-- and microsecond components. Each component is bounded, so they are not
@@ -53,7 +55,7 @@ data Interval = MkInterval
5355 days :: ! Int. Int32 ,
5456 microseconds :: ! Int. Int64
5557 }
56- deriving (Eq , Show )
58+ deriving (Eq , TH.Lift , Show )
5759
5860-- | Uses 'parse'. Ensures that the OID is 'Postgres.intervalOid'.
5961instance Postgres. FromField Interval where
You can’t perform that action at this time.
0 commit comments