@@ -80,28 +80,12 @@ prettyPrintParseException :: ParseException -> String
80prettyPrintParseException pe = case pe of
80prettyPrintParseException pe = case pe of
81 NonScalarKey -> "Non scalar key"
81 NonScalarKey -> "Non scalar key"
82 UnknownAlias anchor -> "Unknown alias `" ++ anchor ++ "`"
82 UnknownAlias anchor -> "Unknown alias `" ++ anchor ++ "`"
83− UnexpectedEvent mbExpected mbUnexpected ->
83+ UnexpectedEvent mbExpected mbUnexpected -> unlines
84− assert (not (isNothing mbExpected && isNothing mbUnexpected)) $
85− case (mbExpected, mbUnexpected) of
86− (Nothing, Nothing) -> unlines
87− [ "Got UnexpectedEvent with two `Nothing`s, this should never happen."
88− , "Please report it as a bug at <https://github.com/snoyberg/yaml/>"
90− (Just expected, Just received) -> unlines
91− [ "Unexpected event: expected"
84+ [ "Unexpected event: expected"
92− , " " ++ show expected
85+ , " " ++ show mbExpected
93− , "but received"
86+ , "but received"
94− , " " ++ show received
87+ , " " ++ show mbUnexpected
96− (Just expected, Nothing) -> unlines
98− , " " ++ show expected
101− (Nothing, Just received) -> unlines
102− [ "Expected no events, but received"
103− , " " ++ show received
105 InvalidYaml mbYamlError -> case mbYamlError of
89 InvalidYaml mbYamlError -> case mbYamlError of
106 Nothing -> "Unspecified YAML error"
90 Nothing -> "Unspecified YAML error"
107 Just yamlError -> case yamlError of
91 Just yamlError -> case yamlError of