on dev help sign in
remove Data instances
commitfd3b67a1d95acbfbadc3ca18777a76e2b8bd83fe authorEitan Chatav <eitan.chatav@gmail.com> dateSat 19 Aug 2017, 13:09 (9 years ago) parentee58d6a
5 files changed+12−20
squeal-postgresql/src/Squeal/PostgreSQL/Definition.hs+6−7 squeal-postgresql/src/Squeal/PostgreSQL/Expression.hs+3−4 squeal-postgresql/src/Squeal/PostgreSQL/Manipulation.hs+1−5 squeal-postgresql/src/Squeal/PostgreSQL/Query.hs+1−2 squeal-postgresql/src/Squeal/PostgreSQL/Schema.hs+1−2
squeal-postgresql/src/Squeal/PostgreSQL/Definition.hs+6−7
@@ -46,7 +46,6 @@ module Squeal.PostgreSQL.Definition
4646import Control.Category
4747import Control.DeepSeq
4848import Data.ByteString
49−import Data.Data
5049import Data.Monoid
5150import Generics.SOP
5251import GHC.TypeLits
@@ -66,7 +65,7 @@ newtype Definition
6665 (schema0 :: TablesType)
6766 (schema1 :: TablesType)
6867 = UnsafeDefinition { renderDefinition :: ByteString }
69− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
68+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
7069
7170instance Category Definition where
7271 id = UnsafeDefinition ";"
@@ -102,7 +101,7 @@ newtype TableConstraint
102101 (schema :: TablesType)
103102 (columns :: ColumnsType)
104103 = UnsafeTableConstraint { renderTableConstraint :: ByteString }
105− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
104+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
106105
107106check
108107 :: Condition '[table ::: columns] 'Ungrouped '[]
@@ -148,7 +147,7 @@ data OnDelete
148147 = OnDeleteNoAction
149148 | OnDeleteRestrict
150149 | OnDeleteCascade
151− deriving (GHC.Generic,Show,Eq,Ord,Data)
150+ deriving (GHC.Generic,Show,Eq,Ord)
152151instance NFData OnDelete
153152
154153renderOnDelete :: OnDelete -> ByteString
@@ -161,7 +160,7 @@ data OnUpdate
161160 = OnUpdateNoAction
162161 | OnUpdateRestrict
163162 | OnUpdateCascade
164− deriving (GHC.Generic,Show,Eq,Ord,Data)
163+ deriving (GHC.Generic,Show,Eq,Ord)
165164instance NFData OnUpdate
166165
167166renderOnUpdate :: OnUpdate -> ByteString
@@ -208,7 +207,7 @@ newtype AlterTable
208207 (columns0 :: ColumnsType)
209208 (columns1 :: ColumnsType) =
210209 UnsafeAlterTable {renderAlterTable :: ByteString}
211− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
210+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
212211
213212addColumnDefault
214213 :: KnownSymbol column
@@ -251,7 +250,7 @@ alterColumn column alteration = UnsafeAlterTable $
251250
252251newtype AlterColumn (ty0 :: ColumnType) (ty1 :: ColumnType) =
253252 UnsafeAlterColumn {renderAlterColumn :: ByteString}
254− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
253+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
255254
256255setDefault
257256 :: Expression '[] 'Ungrouped '[] ('Required ty)
squeal-postgresql/src/Squeal/PostgreSQL/Expression.hs+3−4
@@ -152,7 +152,6 @@ module Squeal.PostgreSQL.Expression
152152import Control.Category
153153import Control.DeepSeq
154154import Data.ByteString (ByteString)
155−import Data.Data (Data)
156155import Data.Function ((&))
157156import Data.Monoid hiding (All)
158157import Data.Ratio
@@ -186,7 +185,7 @@ newtype Expression
186185 (params :: [ColumnType])
187186 (ty :: ColumnType)
188187 = UnsafeExpression { renderExpression :: ByteString }
189− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
188+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
190189
191190{- | A `HasParameter` constraint is used to indicate a value that is
192191supplied externally to a SQL statement.
@@ -763,7 +762,7 @@ newtype Table
763762 (schema :: TablesType)
764763 (columns :: ColumnsType)
765764 = UnsafeTable { renderTable :: ByteString }
766− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
765+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
767766
768767class KnownSymbol table => HasTable table tables columns
769768 | table tables -> columns where
@@ -785,7 +784,7 @@ type expressions
785784
786785newtype TypeExpression (ty :: ColumnType)
787786 = UnsafeTypeExpression { renderTypeExpression :: ByteString }
788− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
787+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
789788
790789bool :: TypeExpression ('Required ('Null 'PGbool))
791790bool = UnsafeTypeExpression "bool"
squeal-postgresql/src/Squeal/PostgreSQL/Manipulation.hs+1−5
@@ -30,14 +30,10 @@ module Squeal.PostgreSQL.Manipulation
3030 , deleteFrom
3131 ) where
3232
33−-- import Control.Category
3433import Control.DeepSeq
3534import Data.ByteString
36−import Data.Data
3735import Data.Monoid
3836import Generics.SOP
39−-- import GHC.TypeLits
40−-- import Prelude hiding ((.), id)
4137
4238import qualified GHC.Generics as GHC
4339
@@ -51,7 +47,7 @@ newtype Manipulation
5147 (params :: [ColumnType])
5248 (columns :: ColumnsType)
5349 = UnsafeManipulation { renderManipulation :: ByteString }
54− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
50+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
5551
5652queryStatement
5753 :: Query schema params columns
squeal-postgresql/src/Squeal/PostgreSQL/Query.hs+1−2
@@ -61,7 +61,6 @@ module Squeal.PostgreSQL.Query
6161
6262import Control.DeepSeq
6363import Data.ByteString (ByteString)
64−import Data.Data
6564import Data.Monoid
6665import Data.String
6766import Data.Word
@@ -79,7 +78,7 @@ newtype Query
7978 (params :: [ColumnType])
8079 (columns :: ColumnsType)
8180 = UnsafeQuery { renderQuery :: ByteString }
82− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
81+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
8382
8483union, unionAll, intersect, intersectAll, except, exceptAll
8584 :: Query schema params columns
squeal-postgresql/src/Squeal/PostgreSQL/Schema.hs+1−2
@@ -72,7 +72,6 @@ module Squeal.PostgreSQL.Schema
7272
7373import Control.DeepSeq
7474import Data.ByteString
75−import Data.Data (Data)
7675import Data.Monoid
7776import Data.String
7877import Generics.SOP (AllZip)
@@ -167,7 +166,7 @@ type (:::) (alias :: Symbol) (ty :: polykind) = '(alias,ty)
167166-- >>> #foobar :: Alias "foobar"
168167-- Alias
169168data Alias (alias :: Symbol) = Alias
170− deriving (Eq,Generic,Data,Ord,Show,NFData)
169+ deriving (Eq,Generic,Ord,Show,NFData)
171170instance alias1 ~ alias2 => IsLabel alias1 (Alias alias2) where
172171 fromLabel = Alias
173172