diff --git a/src/Database/Esqueleto.hs b/src/Database/Esqueleto.hs index b9fa17b..d91827c 100644 --- a/src/Database/Esqueleto.hs +++ b/src/Database/Esqueleto.hs @@ -51,6 +51,7 @@ module Database.Esqueleto , set, (=.), (+=.), (-=.), (*=.), (/=.) ) , from , Value(..) + , unValue , ValueList(..) , OrderBy -- ** Joins diff --git a/src/Database/Esqueleto/Internal/Language.hs b/src/Database/Esqueleto/Internal/Language.hs index d6ca398..b71f066 100644 --- a/src/Database/Esqueleto/Internal/Language.hs +++ b/src/Database/Esqueleto/Internal/Language.hs @@ -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) -- +-- | 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'). diff --git a/test/Test.hs b/test/Test.hs index b6c0193..dc16400 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -879,6 +879,3 @@ run_worker act = #else (runMigrationSilent migrateAll >>) $ act #endif - -unValue :: Value a -> a -unValue (Value a) = a