@@ -133,15 +133,15 @@ deriveToRow t = do
133
133
data EntityOptions = EntityOptions
134
134
{ eoTableName :: String -> String -- ^ Type name to table name converter
135
135
, eoColumnNames :: String -> String -- ^ Record field to column name converter
136
- , eoDeriveClassess :: [Name ] -- ^ Typeclasses to derive for Id
136
+ , eoDeriveClasses :: [Name ] -- ^ Typeclasses to derive for Id
137
137
, eoIdType :: Name -- ^ Base type for Id
138
138
}
139
139
140
140
instance Default EntityOptions where
141
141
def = EntityOptions
142
142
{ eoTableName = id
143
143
, eoColumnNames = id
144
- , eoDeriveClassess = [''Ord, ''Eq, ''Show]
144
+ , eoDeriveClasses = [''Ord, ''Eq, ''Show]
145
145
, eoIdType = ''Integer
146
146
}
147
147
@@ -156,10 +156,10 @@ data Agent = Agent
156
156
} deriving (Ord, Eq, Show)
157
157
158
158
$(deriveEntity
159
- def { eoIdType = ''Id
160
- , eoTableName = toUnderscore
161
- , eoColumnNames = toUnderscore . drop 1
162
- , eoDeriveClassess =
159
+ def { eoIdType = ''Id
160
+ , eoTableName = toUnderscore
161
+ , eoColumnNames = toUnderscore . drop 1
162
+ , eoDeriveClasses =
163
163
[''Show, ''Read, ''Ord, ''Eq
164
164
, ''FromField, ''ToField, ''PathPiece]
165
165
}
@@ -195,7 +195,7 @@ deriveEntity opts tname = do
195
195
idcon = RecC (mkName idname)
196
196
[(mkName unidname, NotStrict , idtype)]
197
197
iddec = NewtypeInstD [] entityIdName [ConT tname]
198
- idcon (eoDeriveClassess opts)
198
+ idcon (eoDeriveClasses opts)
199
199
tblName = eoTableName opts tnames
200
200
fldNames = map (eoColumnNames opts . nameBase) $ cFieldNames tcon
201
201
VarE ntableName <- [e |tableName|]
@@ -217,10 +217,10 @@ data Agent = Agent
217
217
} deriving (Ord, Eq, Show)
218
218
219
219
$(deriveEverything
220
- def { eoIdType = ''Id
221
- , eoTableName = toUnderscore
222
- , eoColumnNames = toUnderscore . drop 1
223
- , eoDeriveClassess =
220
+ def { eoIdType = ''Id
221
+ , eoTableName = toUnderscore
222
+ , eoColumnNames = toUnderscore . drop 1
223
+ , eoDeriveClasses =
224
224
[''Show, ''Read, ''Ord, ''Eq
225
225
, ''FromField, ''ToField, ''PathPiece]
226
226
}
0 commit comments