From e6a6926e18a032a129936794184b518189207648 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Wed, 26 Aug 2020 18:58:48 +0200 Subject: Validate anonymous operation definitions --- src/Language/GraphQL/AST/Document.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Language/GraphQL/AST/Document.hs') diff --git a/src/Language/GraphQL/AST/Document.hs b/src/Language/GraphQL/AST/Document.hs index f60ddda..72d39bb 100644 --- a/src/Language/GraphQL/AST/Document.hs +++ b/src/Language/GraphQL/AST/Document.hs @@ -62,6 +62,12 @@ data Location = Location , column :: Word } deriving (Eq, Show) +instance Ord Location where + compare (Location thisLine thisColumn) (Location thatLine thatColumn) + | thisLine < thatLine = LT + | thisLine > thatLine = GT + | otherwise = compare thisColumn thatColumn + -- ** Document -- | GraphQL document. -- cgit v1.2.3