on master help sign in
adjust toInsertExpr "forall a. forall t." to "forall a t."
commit8fbcf594e60c23afc21f35a7764e315040a0a9c1 authorAgentM <agentm@themactionfaction.com> dateThu 5 Oct 2017, 16:47 (9 years ago) parent4da5ec0
2 files changed+2−2
docs/tupleable.markdown+1−1 src/lib/ProjectM36/Tupleable.hs+1−1
docs/tupleable.markdown+1−1
@@ -27,7 +27,7 @@ Now, ```Person``` values can be marshaled between the database and the client. T
2727
2828The ```Tupleable``` module includes the following functions:
2929
30− * ```toInsertExpr :: forall a. forall t. (Tupleable a, Traversable t) => t a -> RelVarName -> Either RelationalError DatabaseContextExpr```
30+ * ```toInsertExpr :: forall a t. (Tupleable a, Traversable t) => t a -> RelVarName -> Either RelationalError DatabaseContextExpr```
3131 * creates an ```Insert``` expression which can be used to insert a set of ```Tupleable``` values into the relation variable named by the ```RelVarName```
3232 * ```toAttributes :: Proxy a -> Attributes```
3333 * generates ```Attributes``` from a ```Tupleable``` value- can be used with ```undefined```, so an actual value is not necessary
src/lib/ProjectM36/Tupleable.hs+1−1
@@ -48,7 +48,7 @@ instance Tupleable Test7T
4848-}
4949
5050-- | Convert a 'Traverseable' of 'Tupleable's to an 'Insert' 'DatabaseContextExpr'. This is useful for converting, for example, a list of data values to a set of Insert expressions which can be used to add the values to the database.
51−toInsertExpr :: forall a. forall t. (Tupleable a, Traversable t) => t a -> RelVarName -> Either RelationalError DatabaseContextExpr
51+toInsertExpr :: forall a t. (Tupleable a, Traversable t) => t a -> RelVarName -> Either RelationalError DatabaseContextExpr
5252toInsertExpr vals rvName = do
5353 let attrs = toAttributes (Proxy :: Proxy a)
5454 tuples <- mkTupleSet attrs $ toList (fmap toTuple vals)