Skip to content

Commit

Permalink
ok for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
parsonsmatt committed Jan 13, 2025
1 parent 9fd81b5 commit 498ed7f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Database/Esqueleto/Internal/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2523,6 +2523,13 @@ veryUnsafeCoerceSqlExpr (ERaw m k) = ERaw m k
unsafeCoerceSqlExpr :: (Coercible a b) => SqlExpr a -> SqlExpr b
unsafeCoerceSqlExpr = veryUnsafeCoerceSqlExpr

-- | Like 'unsafeCoerceSqlExpr' but for the common case where you are
-- coercing a 'Value'.
--
-- @since 3.6.0.0
unsafeCoerceSqlExprValue :: (Coercible a b) => SqlExpr (Value a) -> SqlExpr (Value b)
unsafeCoerceSqlExprValue = veryUnsafeCoerceSqlExpr

-- | Folks often want the ability to promote a Haskell function into the
-- 'SqlExpr' expression language - and naturally reach for 'fmap'.
-- Unfortunately, this is impossible. We cannot send *functions* to the
Expand Down

0 comments on commit 498ed7f

Please sign in to comment.