Export an unValue function.

This commit is contained in:
Felipe Lessa 2014-05-08 10:55:08 -03:00
parent b04be7d615
commit 46fa0cafcf
3 changed files with 9 additions and 3 deletions

View File

@ -51,6 +51,7 @@ module Database.Esqueleto
, set, (=.), (+=.), (-=.), (*=.), (/=.) )
, from
, Value(..)
, unValue
, ValueList(..)
, OrderBy
-- ** Joins

View File

@ -16,6 +16,7 @@ module Database.Esqueleto.Internal.Language
Esqueleto(..)
, from
, Value(..)
, unValue
, ValueList(..)
, SomeValue(..)
, ToSomeValues(..)
@ -337,6 +338,13 @@ data Value a = Value a deriving (Eq, Ord, Show, Typeable)
-- <https://ghc.haskell.org/trac/ghc/ticket/6124>
-- | Unwrap a 'Value'.
--
-- /Since: 1.4.1/
unValue :: Value a -> a
unValue (Value a) = a
-- | A list of single values. There's a limited set of functions
-- able to work with this data type (such as 'subList_select',
-- 'valList', 'in_' and 'exists').

View File

@ -879,6 +879,3 @@ run_worker act =
#else
(runMigrationSilent migrateAll >>) $ act
#endif
unValue :: Value a -> a
unValue (Value a) = a