mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 04:51:35 +03:00
ed26da59a6
These changes also add a new type, PGColumnType, between PGColInfo and PGScalarType, and they process PGRawColumnType values into PGColumnType values during schema cache generation.
20 lines
528 B
Haskell
20 lines
528 B
Haskell
module Control.Lens.Extended
|
|
( module Control.Lens
|
|
, (^..)
|
|
, (^@..)
|
|
) where
|
|
|
|
import Control.Lens hiding ((^..), (^@..))
|
|
import Data.Monoid (Endo)
|
|
import GHC.Exts (IsList, Item, fromList)
|
|
|
|
infixl 8 ^..
|
|
(^..) :: (IsList l, Item l ~ a) => s -> Getting (Endo [a]) s a -> l
|
|
v ^.. l = fromList (toListOf l v)
|
|
{-# INLINE (^..) #-}
|
|
|
|
infixl 8 ^@..
|
|
(^@..) :: (IsList l, Item l ~ (i, a)) => s -> IndexedGetting i (Endo [(i, a)]) s a -> l
|
|
v ^@.. l = fromList (itoListOf l v)
|
|
{-# INLINE (^@..) #-}
|