Use Seq as base monad in the validator

It is more natural to implement the logic: try to apply each rule to
each node.
This commit is contained in:
2020-09-14 07:49:33 +02:00
parent 08998dbd93
commit 4c10ce9204
11 changed files with 123 additions and 137 deletions

View File

@ -398,7 +398,12 @@ arguments :: Parser [Argument]
arguments = listOptIn parens argument <?> "Arguments"
argument :: Parser Argument
argument = Argument <$> name <* colon <*> value <?> "Argument"
argument = label "Argument" $ do
location <- getLocation
name' <- name
colon
value' <- value
pure $ Argument name' value' location
fragmentSpread :: Parser FragmentSpread
fragmentSpread = label "FragmentSpread" $ do