From 5e9bf9648d891591fcb1f0e1c7b250fb80b1ddc6 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 21 Jun 2019 10:44:58 +0200 Subject: Parse queries with megaparsec --- Data/GraphQL/Error.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Data/GraphQL/Error.hs') diff --git a/Data/GraphQL/Error.hs b/Data/GraphQL/Error.hs index 8c24a81..b19047b 100644 --- a/Data/GraphQL/Error.hs +++ b/Data/GraphQL/Error.hs @@ -1,4 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TupleSections #-} module Data.GraphQL.Error ( parseError, CollectErrsT, @@ -31,7 +32,7 @@ joinErrs = fmap $ fmap fst &&& concatMap snd -- | Wraps the given 'Applicative' to handle errors errWrap :: Functor f => f a -> f (a, [Aeson.Value]) -errWrap = fmap (flip (,) []) +errWrap = fmap (, []) -- | Adds an error to the list of errors. addErr :: Functor f => Aeson.Value -> CollectErrsT f a -> CollectErrsT f a -- cgit v1.2.3