diff options
| author | Eugen Wissner <belka@caraus.de> | 2019-06-21 10:44:58 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2019-06-21 10:44:58 +0200 |
| commit | 5e9bf9648d891591fcb1f0e1c7b250fb80b1ddc6 (patch) | |
| tree | 0654d194f22f695823c275f43e70eeea564c567b /Data/GraphQL/Error.hs | |
| parent | ce169ecef2ff9530817e330df7584c96d6ca6fee (diff) | |
| download | graphql-5e9bf9648d891591fcb1f0e1c7b250fb80b1ddc6.tar.gz | |
Parse queries with megaparsec
Diffstat (limited to 'Data/GraphQL/Error.hs')
| -rw-r--r-- | Data/GraphQL/Error.hs | 3 |
1 files changed, 2 insertions, 1 deletions
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 |
