mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 20:41:49 +03:00
18 lines
524 B
Haskell
18 lines
524 B
Haskell
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
|
|
|
module Hasura.RQL.Instances where
|
|
|
|
import Hasura.Prelude
|
|
|
|
import Instances.TH.Lift ()
|
|
import qualified Language.Haskell.TH.Syntax as TH
|
|
|
|
import qualified Data.HashMap.Strict as M
|
|
import qualified Data.HashSet as S
|
|
|
|
instance (TH.Lift k, TH.Lift v) => TH.Lift (M.HashMap k v) where
|
|
lift m = [| M.fromList $(TH.lift $ M.toList m) |]
|
|
|
|
instance TH.Lift a => TH.Lift (S.HashSet a) where
|
|
lift s = [| S.fromList $(TH.lift $ S.toList s) |]
|