@@ -57,18 +57,16 @@ toInsertExpr vals rvName = do
5757
5858-- | Convert a 'Tupleable' to a create a 'Define' expression which can be used to create an empty relation variable. Use 'toInsertExpr' to insert the actual tuple data. This function is typically used with 'Data.Proxy'.
5959toDefineExpr :: Tupleable a => Proxy a -> RelVarName -> DatabaseContextExpr
60−toDefineExpr val rvName = Define rvName (map NakedAttributeExpr (V.toList attrs))
60+toDefineExpr prox rvName = Define rvName (map NakedAttributeExpr (V.toList attrs))
6161 where
62− attrs = toAttributes val
63−
64−
62+ attrs = toAttributes prox
6563
6664class Tupleable a where
6765 toTuple :: a -> RelationTuple
6866
6967 fromTuple :: RelationTuple -> Either RelationalError a
7068
71− toAttributes :: Proxy a -> Attributes
69+ toAttributes :: proxy a -> Attributes
7270
7371 default toTuple :: (Generic a, TupleableG (Rep a)) => a -> RelationTuple
7472 toTuple v = toTupleG (from v)
@@ -76,7 +74,7 @@ class Tupleable a where
7674 default fromTuple :: (Generic a, TupleableG (Rep a)) => RelationTuple -> Either RelationalError a
7775 fromTuple tup = to <$> fromTupleG tup
7876
79− default toAttributes :: (Generic a, TupleableG (Rep a)) => Proxy a -> Attributes
77+ default toAttributes :: (Generic a, TupleableG (Rep a)) => proxy a -> Attributes
8078 toAttributes _ = toAttributesG (from (undefined :: a))
8179
8280class TupleableG g where