diff --git a/examples/HDBC/PostgreSQL/example/1/Group.hs b/examples/HDBC/PostgreSQL/example/1/Group.hs index 1bda2882..b395b955 100644 --- a/examples/HDBC/PostgreSQL/example/1/Group.hs +++ b/examples/HDBC/PostgreSQL/example/1/Group.hs @@ -1,9 +1,10 @@ -{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-} +{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances, DeriveGeneric #-} module Group where +import GHC.Generics (Generic) import Prelude hiding (id) import PgTestDataSource (defineTable) $(defineTable [] - "EXAMPLE1" "group" [''Show]) + "EXAMPLE1" "group" [''Show, ''Generic]) diff --git a/examples/HDBC/PostgreSQL/example/1/Membership.hs b/examples/HDBC/PostgreSQL/example/1/Membership.hs index 3daa7f7d..f4289045 100644 --- a/examples/HDBC/PostgreSQL/example/1/Membership.hs +++ b/examples/HDBC/PostgreSQL/example/1/Membership.hs @@ -1,8 +1,9 @@ -{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-} +{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances, DeriveGeneric #-} module Membership where +import GHC.Generics (Generic) import PgTestDataSource (defineTable) $(defineTable [] - "EXAMPLE1" "membership" []) + "EXAMPLE1" "membership" [''Generic]) diff --git a/examples/HDBC/PostgreSQL/example/1/QueryArrowExample.hs b/examples/HDBC/PostgreSQL/example/1/QueryArrowExample.hs index 4185169a..7ad7c9e2 100644 --- a/examples/HDBC/PostgreSQL/example/1/QueryArrowExample.hs +++ b/examples/HDBC/PostgreSQL/example/1/QueryArrowExample.hs @@ -1,9 +1,10 @@ {-# LANGUAGE Arrows #-} -{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-} +{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module QueryArrowExample where +import GHC.Generics (Generic) import Database.Record import Database.Relational.Query.Arrow @@ -54,7 +55,7 @@ haskUserGroup = returnA -< u >< mg ?! snd' data UserOrGroup = UserOrGroup { mayUser :: Maybe User, mayGroup :: Maybe Group } - deriving Show + deriving (Show, Generic) $(makeRecordPersistableDefault ''UserOrGroup) diff --git a/examples/HDBC/PostgreSQL/example/1/QueryExample.hs b/examples/HDBC/PostgreSQL/example/1/QueryExample.hs index 10ba9017..cc131422 100644 --- a/examples/HDBC/PostgreSQL/example/1/QueryExample.hs +++ b/examples/HDBC/PostgreSQL/example/1/QueryExample.hs @@ -1,9 +1,10 @@ {-# LANGUAGE MonadComprehensions #-} -{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-} +{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module QueryExample where +import GHC.Generics (Generic) import Database.Record import Database.Relational.Query @@ -56,7 +57,7 @@ haskUserGroup = ] data UserOrGroup = UserOrGroup { mayUser :: Maybe User, mayGroup :: Maybe Group } - deriving Show + deriving (Show, Generic) $(makeRecordPersistableDefault ''UserOrGroup) diff --git a/examples/HDBC/PostgreSQL/example/1/User.hs b/examples/HDBC/PostgreSQL/example/1/User.hs index 78cbd820..5329d6ca 100644 --- a/examples/HDBC/PostgreSQL/example/1/User.hs +++ b/examples/HDBC/PostgreSQL/example/1/User.hs @@ -1,9 +1,10 @@ -{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-} +{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances, DeriveGeneric #-} module User where +import GHC.Generics (Generic) import Prelude hiding (id) import PgTestDataSource (defineTable) $(defineTable [] - "EXAMPLE1" "user" [''Show]) + "EXAMPLE1" "user" [''Show, ''Generic]) diff --git a/examples/HDBC/PostgreSQL/example/2/KeyTest.hs b/examples/HDBC/PostgreSQL/example/2/KeyTest.hs index 64191910..7c4c5fd5 100644 --- a/examples/HDBC/PostgreSQL/example/2/KeyTest.hs +++ b/examples/HDBC/PostgreSQL/example/2/KeyTest.hs @@ -1,8 +1,9 @@ -{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-} +{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances, DeriveGeneric #-} module KeyTest where +import GHC.Generics (Generic) import PgTestDataSource (defineTable) $(defineTable [] - "EXAMPLE2" "keyTest" []) + "EXAMPLE2" "keyTest" [''Generic]) diff --git a/examples/HDBC/PostgreSQL/example/3/History.hs b/examples/HDBC/PostgreSQL/example/3/History.hs index c495ab4e..b35c088a 100644 --- a/examples/HDBC/PostgreSQL/example/3/History.hs +++ b/examples/HDBC/PostgreSQL/example/3/History.hs @@ -1,9 +1,10 @@ -{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-} +{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances, DeriveGeneric #-} module History where +import GHC.Generics (Generic) import Prelude hiding (seq, log) import PgTestDataSource (defineTable) $(defineTable [] - "EXAMPLE3" "history" [''Show]) + "EXAMPLE3" "history" [''Show, ''Generic]) diff --git a/examples/HDBC/PostgreSQL/example/3/SetA.hs b/examples/HDBC/PostgreSQL/example/3/SetA.hs index 1f7a2081..998e7a68 100644 --- a/examples/HDBC/PostgreSQL/example/3/SetA.hs +++ b/examples/HDBC/PostgreSQL/example/3/SetA.hs @@ -1,9 +1,10 @@ -{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-} +{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances, DeriveGeneric #-} module SetA where +import GHC.Generics (Generic) import Prelude hiding (seq) import PgTestDataSource (defineTable) $(defineTable [] - "EXAMPLE3" "set_a" [''Show]) + "EXAMPLE3" "set_a" [''Show, ''Generic]) diff --git a/examples/HDBC/PostgreSQL/example/3/SetB.hs b/examples/HDBC/PostgreSQL/example/3/SetB.hs index c26d8f75..f40244c6 100644 --- a/examples/HDBC/PostgreSQL/example/3/SetB.hs +++ b/examples/HDBC/PostgreSQL/example/3/SetB.hs @@ -1,9 +1,10 @@ -{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-} +{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances, DeriveGeneric #-} module SetB where +import GHC.Generics (Generic) import Prelude hiding (seq) import PgTestDataSource (defineTable) $(defineTable [] - "EXAMPLE3" "set_b" [''Show]) + "EXAMPLE3" "set_b" [''Show, ''Generic]) diff --git a/examples/HDBC/PostgreSQL/example/4/One.hs b/examples/HDBC/PostgreSQL/example/4/One.hs index 19e8dfc6..e900aa4d 100644 --- a/examples/HDBC/PostgreSQL/example/4/One.hs +++ b/examples/HDBC/PostgreSQL/example/4/One.hs @@ -1,9 +1,10 @@ -{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-} +{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances, DeriveGeneric #-} module One where +import GHC.Generics (Generic) import Prelude hiding (seq) import PgTestDataSource (defineTable) $(defineTable [] - "EXAMPLE4" "one" [''Show]) + "EXAMPLE4" "one" [''Show, ''Generic]) diff --git a/examples/HDBC/PostgreSQL/example/4/StockGoods.hs b/examples/HDBC/PostgreSQL/example/4/StockGoods.hs index e742cf46..1ed51166 100644 --- a/examples/HDBC/PostgreSQL/example/4/StockGoods.hs +++ b/examples/HDBC/PostgreSQL/example/4/StockGoods.hs @@ -1,9 +1,10 @@ -{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-} +{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, FlexibleInstances, DeriveGeneric #-} module StockGoods where +import GHC.Generics (Generic) import Prelude hiding (seq) import PgTestDataSource (defineTable) $(defineTable [] - "EXAMPLE4" "stock_goods" [''Show]) + "EXAMPLE4" "stock_goods" [''Show, ''Generic])