From 899fa1b53117e967ec5f201fb24b1fea9944f1f6 Mon Sep 17 00:00:00 2001 From: Danny Navarro Date: Fri, 18 Sep 2015 18:11:11 +0200 Subject: Handle escaped quotes for GraphQL String Values This also includes a new type for Value String. The tests fail now, although it parses successfully. I'll use a pretty printer in next commit so that it's easier to spot the differences. Onces this is working I'll add the rest of the escaped characters. --- Data/GraphQL/AST.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Data/GraphQL/AST.hs') diff --git a/Data/GraphQL/AST.hs b/Data/GraphQL/AST.hs index 7e8c9b5..45bc519 100644 --- a/Data/GraphQL/AST.hs +++ b/Data/GraphQL/AST.hs @@ -66,12 +66,14 @@ data Value = ValueVariable Variable -- GraphQL Float is double precison | ValueFloat Double | ValueBoolean Bool - | ValueString Text + | ValueString StringValue | ValueEnum Name | ValueList ListValue | ValueObject ObjectValue deriving (Eq,Show) +newtype StringValue = StringValue Text deriving (Eq,Show) + newtype ListValue = ListValue [Value] deriving (Eq,Show) newtype ObjectValue = ObjectValue [ObjectField] deriving (Eq,Show) -- cgit v1.2.3