diff --git a/src/Database/Esqueleto/Internal/Sql.hs b/src/Database/Esqueleto/Internal/Sql.hs index e76fe3b..63f17dc 100644 --- a/src/Database/Esqueleto/Internal/Sql.hs +++ b/src/Database/Esqueleto/Internal/Sql.hs @@ -30,6 +30,7 @@ module Database.Esqueleto.Internal.Sql , Mode(..) , Escape , SqlSelect + , veryUnsafeCoerceSqlExprValue ) where import Control.Applicative (Applicative(..), (<$>)) @@ -343,6 +344,13 @@ unsafeSqlBinOp op (ERaw p1 f1) (ERaw p2 f2) = ERaw Parens f , vals1 <> vals2 ) +-- | (Internal) Coerce a type of a 'SqlExpr (Value a)' into +-- another 'SqlExpr (Value b)'. You should /not/ use this +-- function unless you know what you're doing! +veryUnsafeCoerceSqlExprValue :: SqlExpr (Value a) -> SqlExpr (Value b) +veryUnsafeCoerceSqlExprValue (ERaw p f) = ERaw p f + + ----------------------------------------------------------------------