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:
@ -121,11 +121,11 @@ spec = do
|
||||
|
||||
describe "definition" $
|
||||
it "indents block strings in arguments" $
|
||||
let arguments = [Argument "message" (String "line1\nline2")]
|
||||
field = Field Nothing "field" arguments [] [] $ Location 0 0
|
||||
let location = Location 0 0
|
||||
arguments = [Argument "message" (String "line1\nline2") location]
|
||||
field = Field Nothing "field" arguments [] [] location
|
||||
operation = DefinitionOperation
|
||||
$ SelectionSet (pure $ FieldSelection field)
|
||||
$ Location 0 0
|
||||
$ SelectionSet (pure $ FieldSelection field) location
|
||||
in definition pretty operation `shouldBe` [r|{
|
||||
field(message: """
|
||||
line1
|
||||
|
@ -75,7 +75,7 @@ spec = describe "Lexer" $ do
|
||||
parse dollar "" "$" `shouldParse` "$"
|
||||
runBetween parens `shouldSucceedOn` "()"
|
||||
parse spread "" "..." `shouldParse` "..."
|
||||
parse colon "" ":" `shouldParse` ":"
|
||||
parse colon "" `shouldSucceedOn` ":"
|
||||
parse equals "" "=" `shouldParse` "="
|
||||
parse at "" "@" `shouldParse` "@"
|
||||
runBetween brackets `shouldSucceedOn` "[]"
|
||||
|
Reference in New Issue
Block a user