on dev help sign in
remove Data instances
fd3b67aEitan Chatav
squeal-postgresql/src/Squeal/PostgreSQL/Definition.hs+6−7
@@ -46,7 +46,6 @@ module Squeal.PostgreSQL.Definition
46import Control.Category
46import Control.Category
47import Control.DeepSeq
47import Control.DeepSeq
48import Data.ByteString
48import Data.ByteString
49−import Data.Data
50import Data.Monoid
49import Data.Monoid
51import Generics.SOP
50import Generics.SOP
52import GHC.TypeLits
51import GHC.TypeLits
@@ -66,7 +65,7 @@ newtype Definition
66 (schema0 :: TablesType)
65 (schema0 :: TablesType)
67 (schema1 :: TablesType)
66 (schema1 :: TablesType)
68 = UnsafeDefinition { renderDefinition :: ByteString }
67 = UnsafeDefinition { renderDefinition :: ByteString }
69− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
68+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
70
69
71instance Category Definition where
70instance Category Definition where
72 id = UnsafeDefinition ";"
71 id = UnsafeDefinition ";"
@@ -102,7 +101,7 @@ newtype TableConstraint
102 (schema :: TablesType)
101 (schema :: TablesType)
103 (columns :: ColumnsType)
102 (columns :: ColumnsType)
104 = UnsafeTableConstraint { renderTableConstraint :: ByteString }
103 = UnsafeTableConstraint { renderTableConstraint :: ByteString }
105− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
104+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
106
105
107check
106check
108 :: Condition '[table ::: columns] 'Ungrouped '[]
107 :: Condition '[table ::: columns] 'Ungrouped '[]
@@ -148,7 +147,7 @@ data OnDelete
148 = OnDeleteNoAction
147 = OnDeleteNoAction
149 | OnDeleteRestrict
148 | OnDeleteRestrict
150 | OnDeleteCascade
149 | OnDeleteCascade
151− deriving (GHC.Generic,Show,Eq,Ord,Data)
150+ deriving (GHC.Generic,Show,Eq,Ord)
152instance NFData OnDelete
151instance NFData OnDelete
153
152
154renderOnDelete :: OnDelete -> ByteString
153renderOnDelete :: OnDelete -> ByteString
@@ -161,7 +160,7 @@ data OnUpdate
161 = OnUpdateNoAction
160 = OnUpdateNoAction
162 | OnUpdateRestrict
161 | OnUpdateRestrict
163 | OnUpdateCascade
162 | OnUpdateCascade
164− deriving (GHC.Generic,Show,Eq,Ord,Data)
163+ deriving (GHC.Generic,Show,Eq,Ord)
165instance NFData OnUpdate
164instance NFData OnUpdate
166
165
167renderOnUpdate :: OnUpdate -> ByteString
166renderOnUpdate :: OnUpdate -> ByteString
@@ -208,7 +207,7 @@ newtype AlterTable
208 (columns0 :: ColumnsType)
207 (columns0 :: ColumnsType)
209 (columns1 :: ColumnsType) =
208 (columns1 :: ColumnsType) =
210 UnsafeAlterTable {renderAlterTable :: ByteString}
209 UnsafeAlterTable {renderAlterTable :: ByteString}
211− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
210+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
212
211
213addColumnDefault
212addColumnDefault
214 :: KnownSymbol column
213 :: KnownSymbol column
@@ -251,7 +250,7 @@ alterColumn column alteration = UnsafeAlterTable $
251
250
252newtype AlterColumn (ty0 :: ColumnType) (ty1 :: ColumnType) =
251newtype AlterColumn (ty0 :: ColumnType) (ty1 :: ColumnType) =
253 UnsafeAlterColumn {renderAlterColumn :: ByteString}
252 UnsafeAlterColumn {renderAlterColumn :: ByteString}
254− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
253+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
255
254
256setDefault
255setDefault
257 :: Expression '[] 'Ungrouped '[] ('Required ty)
256 :: Expression '[] 'Ungrouped '[] ('Required ty)
squeal-postgresql/src/Squeal/PostgreSQL/Expression.hs+3−4
@@ -152,7 +152,6 @@ module Squeal.PostgreSQL.Expression
152import Control.Category
152import Control.Category
153import Control.DeepSeq
153import Control.DeepSeq
154import Data.ByteString (ByteString)
154import Data.ByteString (ByteString)
155−import Data.Data (Data)
156import Data.Function ((&))
155import Data.Function ((&))
157import Data.Monoid hiding (All)
156import Data.Monoid hiding (All)
158import Data.Ratio
157import Data.Ratio
@@ -186,7 +185,7 @@ newtype Expression
186 (params :: [ColumnType])
185 (params :: [ColumnType])
187 (ty :: ColumnType)
186 (ty :: ColumnType)
188 = UnsafeExpression { renderExpression :: ByteString }
187 = UnsafeExpression { renderExpression :: ByteString }
189− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
188+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
190
189
191{- | A `HasParameter` constraint is used to indicate a value that is
190{- | A `HasParameter` constraint is used to indicate a value that is
192supplied externally to a SQL statement.
191supplied externally to a SQL statement.
@@ -763,7 +762,7 @@ newtype Table
763 (schema :: TablesType)
762 (schema :: TablesType)
764 (columns :: ColumnsType)
763 (columns :: ColumnsType)
765 = UnsafeTable { renderTable :: ByteString }
764 = UnsafeTable { renderTable :: ByteString }
766− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
765+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
767
766
768class KnownSymbol table => HasTable table tables columns
767class KnownSymbol table => HasTable table tables columns
769 | table tables -> columns where
768 | table tables -> columns where
@@ -785,7 +784,7 @@ type expressions
785
784
786newtype TypeExpression (ty :: ColumnType)
785newtype TypeExpression (ty :: ColumnType)
787 = UnsafeTypeExpression { renderTypeExpression :: ByteString }
786 = UnsafeTypeExpression { renderTypeExpression :: ByteString }
788− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
787+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
789
788
790bool :: TypeExpression ('Required ('Null 'PGbool))
789bool :: TypeExpression ('Required ('Null 'PGbool))
791bool = UnsafeTypeExpression "bool"
790bool = UnsafeTypeExpression "bool"
squeal-postgresql/src/Squeal/PostgreSQL/Manipulation.hs+1−5
@@ -30,14 +30,10 @@ module Squeal.PostgreSQL.Manipulation
30 , deleteFrom
30 , deleteFrom
31 ) where
31 ) where
32
32
33−-- import Control.Category
34import Control.DeepSeq
33import Control.DeepSeq
35import Data.ByteString
34import Data.ByteString
36−import Data.Data
37import Data.Monoid
35import Data.Monoid
38import Generics.SOP
36import Generics.SOP
39−-- import GHC.TypeLits
40−-- import Prelude hiding ((.), id)
41
37
42import qualified GHC.Generics as GHC
38import qualified GHC.Generics as GHC
43
39
@@ -51,7 +47,7 @@ newtype Manipulation
51 (params :: [ColumnType])
47 (params :: [ColumnType])
52 (columns :: ColumnsType)
48 (columns :: ColumnsType)
53 = UnsafeManipulation { renderManipulation :: ByteString }
49 = UnsafeManipulation { renderManipulation :: ByteString }
54− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
50+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
55
51
56queryStatement
52queryStatement
57 :: Query schema params columns
53 :: Query schema params columns
squeal-postgresql/src/Squeal/PostgreSQL/Query.hs+1−2
@@ -61,7 +61,6 @@ module Squeal.PostgreSQL.Query
61
61
62import Control.DeepSeq
62import Control.DeepSeq
63import Data.ByteString (ByteString)
63import Data.ByteString (ByteString)
64−import Data.Data
65import Data.Monoid
64import Data.Monoid
66import Data.String
65import Data.String
67import Data.Word
66import Data.Word
@@ -79,7 +78,7 @@ newtype Query
79 (params :: [ColumnType])
78 (params :: [ColumnType])
80 (columns :: ColumnsType)
79 (columns :: ColumnsType)
81 = UnsafeQuery { renderQuery :: ByteString }
80 = UnsafeQuery { renderQuery :: ByteString }
82− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
81+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
83
82
84union, unionAll, intersect, intersectAll, except, exceptAll
83union, unionAll, intersect, intersectAll, except, exceptAll
85 :: Query schema params columns
84 :: Query schema params columns
squeal-postgresql/src/Squeal/PostgreSQL/Schema.hs+1−2
@@ -72,7 +72,6 @@ module Squeal.PostgreSQL.Schema
72
72
73import Control.DeepSeq
73import Control.DeepSeq
74import Data.ByteString
74import Data.ByteString
75−import Data.Data (Data)
76import Data.Monoid
75import Data.Monoid
77import Data.String
76import Data.String
78import Generics.SOP (AllZip)
77import Generics.SOP (AllZip)
@@ -167,7 +166,7 @@ type (:::) (alias :: Symbol) (ty :: polykind) = '(alias,ty)
167-- >>> #foobar :: Alias "foobar"
166-- >>> #foobar :: Alias "foobar"
168-- Alias
167-- Alias
169data Alias (alias :: Symbol) = Alias
168data Alias (alias :: Symbol) = Alias
170− deriving (Eq,Generic,Data,Ord,Show,NFData)
169+ deriving (Eq,Generic,Ord,Show,NFData)
171instance alias1 ~ alias2 => IsLabel alias1 (Alias alias2) where
170instance alias1 ~ alias2 => IsLabel alias1 (Alias alias2) where
172 fromLabel = Alias
171 fromLabel = Alias
173
172