From 457d6caccde4b57575388cc97373cc5c44abea59 Mon Sep 17 00:00:00 2001 From: Dan Brooks Date: Fri, 22 Jun 2018 19:54:18 +0100 Subject: [PATCH] Define applicative instance for Value --- src/Database/Esqueleto/Internal/Language.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Database/Esqueleto/Internal/Language.hs b/src/Database/Esqueleto/Internal/Language.hs index ef47ee1..f343838 100644 --- a/src/Database/Esqueleto/Internal/Language.hs +++ b/src/Database/Esqueleto/Internal/Language.hs @@ -630,6 +630,9 @@ newtype Value a = Value { unValue :: a } deriving (Eq, Ord, Show, Typeable) instance Functor Value where fmap f (Value a) = Value (f a) +instance Applicative Value where + (<*>) (Value f) (Value a) = Value (f a) + pure = Value -- | A list of single values. There's a limited set of functions -- able to work with this data type (such as 'subList_select',