diff options
| author | Eugen Wissner <belka@caraus.de> | 2021-03-14 12:19:30 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2021-03-14 12:19:30 +0100 |
| commit | 4d762d635666a954000be76832303eb3170f4ee2 (patch) | |
| tree | b12e77888d7dc6d7f81b2be4311da56d8e96494d /src/Language/GraphQL/AST/Encoder.hs | |
| parent | cbccb9ed0b32167dbb4de16eb5143dd62f9f3159 (diff) | |
| download | graphql-4d762d635666a954000be76832303eb3170f4ee2.tar.gz | |
Add location information to list values
Diffstat (limited to 'src/Language/GraphQL/AST/Encoder.hs')
| -rw-r--r-- | src/Language/GraphQL/AST/Encoder.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Language/GraphQL/AST/Encoder.hs b/src/Language/GraphQL/AST/Encoder.hs index f04f385..0d448df 100644 --- a/src/Language/GraphQL/AST/Encoder.hs +++ b/src/Language/GraphQL/AST/Encoder.hs @@ -219,7 +219,7 @@ fromConstValue (Full.ConstBoolean x) = Full.Boolean x fromConstValue Full.ConstNull = Full.Null fromConstValue (Full.ConstString string) = Full.String string fromConstValue (Full.ConstEnum x) = Full.Enum x -fromConstValue (Full.ConstList x) = Full.List $ fromConstValue <$> x +fromConstValue (Full.ConstList x) = Full.List $ fmap fromConstValue <$> x fromConstValue (Full.ConstObject x) = Full.Object $ fromConstObjectField <$> x where fromConstObjectField Full.ObjectField{value = value', ..} = @@ -266,8 +266,8 @@ stringValue (Pretty indentation) string = = Builder.fromLazyText (indent (indentation + 1)) <> line' <> newline <> acc -listValue :: Formatter -> [Full.Value] -> Lazy.Text -listValue formatter = bracketsCommas formatter $ value formatter +listValue :: Formatter -> [Full.Node Full.Value] -> Lazy.Text +listValue formatter = bracketsCommas formatter $ value formatter . Full.node objectValue :: Formatter -> [Full.ObjectField Full.Value] -> Lazy.Text objectValue formatter = intercalate $ objectField formatter |
