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, (=.), (+=.), (-=.), (*=.), (/=.) ) , set, (=.), (+=.), (-=.), (*=.), (/=.) )
, from , from
, Value(..) , Value(..)
, unValue
, ValueList(..) , ValueList(..)
, OrderBy , OrderBy
-- ** Joins -- ** Joins

View File

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

View File

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