Update to Stackage LTS 18 and GH Actions (#321)

This commit is contained in:
Alejandro Serrano 2022-01-10 14:21:34 +01:00 committed by GitHub
parent 4b5ee4dff0
commit f7108b78e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 57 additions and 37 deletions

View File

@ -7,8 +7,8 @@ jobs:
- uses: actions/checkout@v2.3.4 - uses: actions/checkout@v2.3.4
with: with:
submodules: true submodules: true
- uses: cachix/install-nix-action@v12 - uses: cachix/install-nix-action@v13
- uses: cachix/cachix-action@v8 - uses: cachix/cachix-action@v10
with: with:
name: 47deg name: 47deg
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'

View File

@ -1,5 +1,5 @@
let let
haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/e7961ee.tar.gz) {}; haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/7ef531c.tar.gz) {};
nixpkgsSrc = haskellNix.sources.nixpkgs-2003; nixpkgsSrc = haskellNix.sources.nixpkgs-2003;
nixpkgsArgs = haskellNix.nixpkgsArgs; nixpkgsArgs = haskellNix.nixpkgsArgs;
in in

View File

@ -1,5 +1,5 @@
name: mu-graphql name: mu-graphql
version: 0.5.0.2 version: 0.5.0.3
synopsis: GraphQL support for Mu synopsis: GraphQL support for Mu
description: GraphQL servers and clients for Mu-Haskell description: GraphQL servers and clients for Mu-Haskell
cabal-version: >=1.10 cabal-version: >=1.10
@ -35,7 +35,7 @@ library
, bytestring >=0.10 && <0.11 , bytestring >=0.10 && <0.11
, conduit >=1.3.2 && <2 , conduit >=1.3.2 && <2
, foldl >=1.4 && <2 , foldl >=1.4 && <2
, graphql >=0.11 , graphql >=1.0
, http-types >=0.12 && <0.13 , http-types >=0.12 && <0.13
, list-t >=1.0 && <2 , list-t >=1.0 && <2
, megaparsec >=8 && <10 , megaparsec >=8 && <10

View File

@ -64,7 +64,7 @@ fromGQLValueConst GQL.ConstNull
fromGQLValueConst (GQL.ConstEnum s) fromGQLValueConst (GQL.ConstEnum s)
= pure $ VCEnum $ T.unpack s = pure $ VCEnum $ T.unpack s
fromGQLValueConst (GQL.ConstList xs) fromGQLValueConst (GQL.ConstList xs)
= VCList <$> traverse fromGQLValueConst xs = VCList <$> traverse (fromGQLValueConst . GQL.node) xs
fromGQLValueConst (GQL.ConstObject o) fromGQLValueConst (GQL.ConstObject o)
= VCObject <$> traverse fromGQLField o = VCObject <$> traverse fromGQLField o
where fromGQLField :: GQL.ObjectField GQL.ConstValue where fromGQLField :: GQL.ObjectField GQL.ConstValue
@ -94,7 +94,8 @@ instance ReflectValueConst 'VCNull where
instance KnownSymbol e => ReflectValueConst ('VCEnum e) where instance KnownSymbol e => ReflectValueConst ('VCEnum e) where
reflectValueConst _ = GQL.ConstString $ T.pack $ symbolVal (Proxy @e) reflectValueConst _ = GQL.ConstString $ T.pack $ symbolVal (Proxy @e)
instance ReflectValueConstList xs => ReflectValueConst ('VCList xs) where instance ReflectValueConstList xs => ReflectValueConst ('VCList xs) where
reflectValueConst _ = GQL.ConstList $ reflectValueConstList (Proxy @xs) reflectValueConst _ = GQL.ConstList $
map (`GQL.Node` GQL.Location 0 0) $ reflectValueConstList (Proxy @xs)
instance ReflectValueConstObject xs => ReflectValueConst ('VCObject xs) where instance ReflectValueConstObject xs => ReflectValueConst ('VCObject xs) where
reflectValueConst _ = GQL.ConstObject $ reflectValueConstObject (Proxy @xs) reflectValueConst _ = GQL.ConstObject $ reflectValueConstObject (Proxy @xs)

View File

@ -190,7 +190,7 @@ typeToDec prims schemaName tm sm (GQL.ObjectTypeDefinition _ nm _ _ flds) = do
defToVConst (GQL.ConstEnum e) defToVConst (GQL.ConstEnum e)
= [t| 'VCEnum $(textToStrLit e) |] = [t| 'VCEnum $(textToStrLit e) |]
defToVConst (GQL.ConstList xs) defToVConst (GQL.ConstList xs)
= [t| 'VCList $(typesToList <$> traverse defToVConst xs) |] = [t| 'VCList $(typesToList <$> traverse (defToVConst . GQL.node) xs) |]
defToVConst (GQL.ConstObject obj) defToVConst (GQL.ConstObject obj)
= [t| 'VCObject $(typesToList <$> traverse fromGQLField obj) |] = [t| 'VCObject $(typesToList <$> traverse fromGQLField obj) |]
fromGQLField :: GQL.ObjectField GQL.ConstValue -> Q Type fromGQLField :: GQL.ObjectField GQL.ConstValue -> Q Type

View File

@ -45,7 +45,8 @@ instance A.FromJSON GQL.ConstValue where
parseJSON (A.Number n) = case floatingOrInteger n :: Either Double Int32 of parseJSON (A.Number n) = case floatingOrInteger n :: Either Double Int32 of
Right i -> pure $ GQL.ConstInt i Right i -> pure $ GQL.ConstInt i
Left m -> pure $ GQL.ConstFloat m Left m -> pure $ GQL.ConstFloat m
parseJSON (A.Array xs) = GQL.ConstList . F.toList <$> traverse A.parseJSON xs parseJSON (A.Array xs) = GQL.ConstList . map (`GQL.Node` GQL.Location 0 0) . F.toList
<$> traverse A.parseJSON xs
parseJSON (A.Object o) = GQL.ConstObject . fmap toObjFld . HM.toList <$> traverse A.parseJSON o parseJSON (A.Object o) = GQL.ConstObject . fmap toObjFld . HM.toList <$> traverse A.parseJSON o
where where
toObjFld :: (T.Text, GQL.ConstValue) -> GQL.ObjectField GQL.ConstValue toObjFld :: (T.Text, GQL.ConstValue) -> GQL.ObjectField GQL.ConstValue
@ -262,7 +263,7 @@ constToValue (GQL.ConstBoolean n) = GQL.Boolean n
constToValue GQL.ConstNull = GQL.Null constToValue GQL.ConstNull = GQL.Null
constToValue (GQL.ConstEnum n) = GQL.Enum n constToValue (GQL.ConstEnum n) = GQL.Enum n
constToValue (GQL.ConstList n) constToValue (GQL.ConstList n)
= GQL.List $ constToValue <$> n = GQL.List $ flip map n $ \(GQL.Node x loc) -> GQL.Node (constToValue x) loc
constToValue (GQL.ConstObject n) constToValue (GQL.ConstObject n)
= GQL.Object = GQL.Object
[ GQL.ObjectField a (GQL.Node (constToValue v) m) l [ GQL.ObjectField a (GQL.Node (constToValue v) m) l
@ -557,7 +558,7 @@ class ParseArg (p :: Package') (a :: TypeRef Symbol) where
instance (ParseArg p r) => ParseArg p ('ListRef r) where instance (ParseArg p r) => ParseArg p ('ListRef r) where
parseArg vmap aname (GQL.List xs) parseArg vmap aname (GQL.List xs)
= ArgList <$> traverse (parseArg' vmap aname) xs = ArgList <$> traverse (parseArg' vmap aname . GQL.node) xs
parseArg _ aname _ parseArg _ aname _
= throwError $ "argument '" <> aname <> "' was not of right type" = throwError $ "argument '" <> aname <> "' was not of right type"
instance ParseArg p ('PrimitiveRef Bool) where instance ParseArg p ('PrimitiveRef Bool) where
@ -715,7 +716,7 @@ instance ValueParser sch ('TPrimitive String) where
valueParser _ _ (GQL.String b) = pure $ FPrimitive $ T.unpack b valueParser _ _ (GQL.String b) = pure $ FPrimitive $ T.unpack b
valueParser _ fname _ = throwError $ "field '" <> fname <> "' was not of right type" valueParser _ fname _ = throwError $ "field '" <> fname <> "' was not of right type"
instance (ValueParser sch r) => ValueParser sch ('TList r) where instance (ValueParser sch r) => ValueParser sch ('TList r) where
valueParser vmap fname (GQL.List xs) = FList <$> traverse (valueParser' vmap fname) xs valueParser vmap fname (GQL.List xs) = FList <$> traverse (valueParser' vmap fname . GQL.node) xs
valueParser _ fname _ = throwError $ "field '" <> fname <> "' was not of right type" valueParser _ fname _ = throwError $ "field '" <> fname <> "' was not of right type"
instance (ValueParser sch r) => ValueParser sch ('TOption r) where instance (ValueParser sch r) => ValueParser sch ('TOption r) where
valueParser _ _ GQL.Null = pure $ FOption Nothing valueParser _ _ GQL.Null = pure $ FOption Nothing
@ -743,7 +744,7 @@ toAesonValue _ (GQL.String s) = pure $ A.String s
toAesonValue _ (GQL.Boolean b) = pure $ A.Bool b toAesonValue _ (GQL.Boolean b) = pure $ A.Bool b
toAesonValue _ GQL.Null = pure A.Null toAesonValue _ GQL.Null = pure A.Null
toAesonValue _ (GQL.Enum e) = pure $ A.String e toAesonValue _ (GQL.Enum e) = pure $ A.String e
toAesonValue vm (GQL.List xs) = A.toJSON <$> traverse (toAesonValue vm) xs toAesonValue vm (GQL.List xs) = A.toJSON <$> traverse (toAesonValue vm . GQL.node) xs
toAesonValue vm (GQL.Object xs) = A.Object . HM.fromList <$> traverse (toKeyValuePairs vm) xs toAesonValue vm (GQL.Object xs) = A.Object . HM.fromList <$> traverse (toKeyValuePairs vm) xs
class ParseDifferentReturn (p :: Package') (r :: Return Symbol (TypeRef Symbol)) where class ParseDifferentReturn (p :: Package') (r :: Return Symbol (TypeRef Symbol)) where

View File

@ -1,5 +1,5 @@
name: mu-grpc-client name: mu-grpc-client
version: 0.4.0.1 version: 0.4.0.2
synopsis: gRPC clients from Mu definitions synopsis: gRPC clients from Mu definitions
description: description:
With @mu-grpc-client@ you can easily build gRPC clients for mu-haskell! With @mu-grpc-client@ you can easily build gRPC clients for mu-haskell!
@ -51,7 +51,7 @@ library
, template-haskell >=2.14 && <2.17 , template-haskell >=2.14 && <2.17
, text >=1.2 && <2 , text >=1.2 && <2
, th-abstraction >=0.3.2 && <0.5 , th-abstraction >=0.3.2 && <0.5
, tracing >=0.0.5 , tracing-control >=0.0.7
hs-source-dirs: src hs-source-dirs: src
default-language: Haskell2010 default-language: Haskell2010

View File

@ -24,7 +24,7 @@ library
, containers >=0.6 && <0.7 , containers >=0.6 && <0.7
, mu-rpc >=0.4.0 , mu-rpc >=0.4.0
, text >=1.2 && <2 , text >=1.2 && <2
, tracing-control >=0.0.6 , tracing-control >=0.0.7
hs-source-dirs: src hs-source-dirs: src
default-language: Haskell2010 default-language: Haskell2010

View File

@ -26,18 +26,18 @@ packages:
- servant/server - servant/server
extra-deps: extra-deps:
- http2-client-0.9.0.0 - http2-client-0.10.0.0
- http2-client-grpc-0.8.0.0 - http2-client-grpc-0.8.0.0
- http2-grpc-proto3-wire-0.1.0.0 - http2-grpc-proto3-wire-0.1.0.0
- http2-grpc-types-0.5.0.0 - http2-grpc-types-0.5.0.0
- proto3-wire-1.2.0 - proto3-wire-1.2.2
- warp-grpc-0.4.0.1 - warp-grpc-0.4.0.1
- hw-kafka-client-3.1.1 - hw-kafka-client-4.0.3
- hw-kafka-conduit-2.7.0 - hw-kafka-conduit-2.7.0
- tracing-control-0.0.6 - tracing-control-0.0.7.2
- wai-middleware-prometheus-1.0.0 - wai-middleware-prometheus-1.0.0.1
- graphql-0.11.0.0 - graphql-1.0.1.0
- generic-aeson-0.2.0.11 - generic-aeson-0.2.0.12
- parameterized-0.5.0.0 - parameterized-0.5.0.0
# Not in LTS 14 # Not in LTS 14
- conduit-1.3.3 - conduit-1.3.3
@ -53,8 +53,8 @@ extra-deps:
- stm-containers-1.1.0.4 - stm-containers-1.1.0.4
- stm-lifted-2.5.0.0 - stm-lifted-2.5.0.0
# Updated servant # Updated servant
- servant-0.18 - servant-0.18.3
- servant-client-core-0.18 - servant-client-core-0.18.3
- servant-client-0.18 - servant-client-0.18.3
- servant-server-0.18 - servant-server-0.18.3
- servant-swagger-1.1.10 - servant-swagger-1.1.10

View File

@ -1,4 +1,4 @@
resolver: nightly-2021-01-27 resolver: nightly-2021-12-17
allow-newer: true allow-newer: true
packages: packages:
@ -26,12 +26,21 @@ packages:
- servant/server - servant/server
extra-deps: extra-deps:
- http2-client-0.9.0.0 - http2-client-0.10.0.0
- http2-client-grpc-0.8.0.0 - http2-client-grpc-0.8.0.0
- http2-grpc-proto3-wire-0.1.0.0 - http2-grpc-proto3-wire-0.1.0.0
- http2-grpc-types-0.5.0.0 - http2-grpc-types-0.5.0.0
- proto3-wire-1.2.0 - proto3-wire-1.2.2
- warp-grpc-0.4.0.1 - warp-grpc-0.4.0.1
- hw-kafka-conduit-2.7.0 - hw-kafka-conduit-2.7.0
- wai-middleware-prometheus-1.0.0 - wai-middleware-prometheus-1.0.0.1
- graphql-0.11.0.0 - graphql-1.0.1.0
# we need an older version
- http2-2.0.6
- warp-3.3.14
# Not in nightly
- generic-lens-2.2.0.0
- generic-lens-core-2.2.0.0
- swagger2-2.6
- servant-swagger-1.1.10
- tracing-control-0.0.7.2

View File

@ -1,4 +1,4 @@
resolver: lts-17.8 resolver: lts-18.18
allow-newer: true allow-newer: true
packages: packages:
@ -26,12 +26,21 @@ packages:
- servant/server - servant/server
extra-deps: extra-deps:
- http2-client-0.9.0.0 - http2-client-0.10.0.0
- http2-client-grpc-0.8.0.0 - http2-client-grpc-0.8.0.0
- http2-grpc-proto3-wire-0.1.0.0 - http2-grpc-proto3-wire-0.1.0.0
- http2-grpc-types-0.5.0.0 - http2-grpc-types-0.5.0.0
- proto3-wire-1.2.0 - proto3-wire-1.2.2
- warp-grpc-0.4.0.1 - warp-grpc-0.4.0.1
- hw-kafka-conduit-2.7.0 - hw-kafka-conduit-2.7.0
- wai-middleware-prometheus-1.0.0 - wai-middleware-prometheus-1.0.0.1
- graphql-0.11.0.0 - graphql-1.0.1.0
# we need an older version
- http2-2.0.6
- warp-3.3.14
# Not in LTS 18
- parser-combinators-1.3.0
- stm-containers-1.2
- stm-hamt-1.2.0.6
- tracing-0.0.7.2
- tracing-control-0.0.7.2