diff options
| author | Eugen Wissner <belka@caraus.de> | 2020-08-26 18:58:48 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2020-08-26 18:58:48 +0200 |
| commit | e6a6926e18a032a129936794184b518189207648 (patch) | |
| tree | 374923eca07e95edd41dd2811cfb5924c33c9fe2 /src/Language/GraphQL/AST/Document.hs | |
| parent | 73555332681a3702db5e277f21a53c628c3a524f (diff) | |
| download | graphql-e6a6926e18a032a129936794184b518189207648.tar.gz | |
Validate anonymous operation definitions
Diffstat (limited to 'src/Language/GraphQL/AST/Document.hs')
| -rw-r--r-- | src/Language/GraphQL/AST/Document.hs | 6 |
1 files changed, 6 insertions, 0 deletions
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. |
