Extract Hasura.Prelude from src-lib

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5776
GitOrigin-RevId: 0df263a4d800e694e68e31c189c360c88cf48abc
This commit is contained in:
Tom Harding 2022-09-09 14:56:54 +01:00 committed by hasura-bot
parent 977c624c9e
commit 70515d94c7
4 changed files with 45 additions and 2 deletions

View File

@ -159,6 +159,7 @@ common lib-depends
, free , free
, hashable , hashable
, hasura-error-message , hasura-error-message
, hasura-prelude
, hasura-schema-parsers , hasura-schema-parsers
, http-client-tls , http-client-tls
, http-conduit , http-conduit
@ -420,7 +421,6 @@ library
, Data.Text.Casing , Data.Text.Casing
, Data.Text.Extended , Data.Text.Extended
, Data.Text.NonEmpty , Data.Text.NonEmpty
, Data.Time.Clock.Units
, Data.Trie , Data.Trie
, Data.URL.Template , Data.URL.Template
, Database.MSSQL.Transaction , Database.MSSQL.Transaction
@ -634,7 +634,6 @@ library
, Hasura.Server.Types , Hasura.Server.Types
, Hasura.Server.Utils , Hasura.Server.Utils
, Hasura.Server.Version , Hasura.Server.Version
, Hasura.Prelude
, Hasura.EncJSON , Hasura.EncJSON
, Hasura.GraphQL.Execute.Query , Hasura.GraphQL.Execute.Query
@ -905,6 +904,7 @@ executable graphql-engine
, bytestring , bytestring
, ekg-core , ekg-core
, ekg-prometheus , ekg-prometheus
, hasura-prelude
, kan-extensions , kan-extensions
, pg-client , pg-client
, text , text
@ -1136,6 +1136,7 @@ test-suite tests-hspec
, graphql-engine , graphql-engine
, graphql-parser , graphql-parser
, haskell-src-meta , haskell-src-meta
, hasura-prelude
, hedgehog , hedgehog
, hspec , hspec
, hspec >=2.8.3 && <3 , hspec >=2.8.3 && <3

View File

@ -0,0 +1,30 @@
cabal-version: 3.0
name: hasura-prelude
version: 0.1.0.0
library
hs-source-dirs: src
build-depends:
aeson,
aeson-casing,
base,
base64-bytestring,
bytestring,
containers,
deepseq,
hashable,
insert-ordered-containers,
lens,
mtl,
nonempty-containers,
pretty-simple,
text,
time,
transformers,
transformers-base,
unordered-containers,
witherable
default-language: Haskell2010
exposed-modules:
Data.Time.Clock.Units
Hasura.Prelude

View File

@ -1,4 +1,13 @@
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE GeneralisedNewtypeDeriving #-}
{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE NumDecimals #-} {-# LANGUAGE NumDecimals #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
-- | Types for time intervals of various units. Each newtype wraps 'DiffTime', -- | Types for time intervals of various units. Each newtype wraps 'DiffTime',
-- but they have different 'Num' instances. The intent is to use the record -- but they have different 'Num' instances. The intent is to use the record

View File

@ -1,3 +1,6 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE LambdaCase #-}
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}