@@ -71,27 +71,27 @@ instance Exception ParseException where
7171--
7272prettyPrintParseException :: ParseException -> String
7373prettyPrintParseException NonScalarKey = "Non scalar key"
74+prettyPrintParseException (UnknownAlias n) =
75+ "Unknown alias: " ++ n
76+prettyPrintParseException (UnexpectedEvent r e) = unlines
77+ [ "Unexpected event:"
78+ , " Received: " ++ maybe "None" show r
79+ , " Expected: " ++ maybe "None" show e
80+ ]
7481prettyPrintParseException (InvalidYaml mye) =
7582 case mye of
7683 Just ye -> "Invalid yaml: " ++ show ye
7784 _ -> "Invalid yaml"
7885prettyPrintParseException (AesonException e) =
7986 "Aeson exception: " ++ e
80−prettyPrintParseException CyclicIncludes = "Cyclic includes"
8187prettyPrintParseException (OtherParseException e) =
8288 "Parse exception: " ++ show e
83−prettyPrintParseException (UnknownAlias n) =
84− "Unknown alias: " ++ n
85−prettyPrintParseException (UnexpectedEvent r e) = unlines
86− [ "Unexpected event:"
87− , " Received: " ++ maybe "None" show r
88− , " Expected: " ++ maybe "None" show e
89− ]
9089prettyPrintParseException (NonStringKeyAlias n v) = unlines
9190 [ "Non-string key alias:"
9291 , " Anchor name: " ++ n
9392 , " Value: " ++ show v
9493 ]
94+prettyPrintParseException CyclicIncludes = "Cyclic includes"
9595
9696newtype PErrorT m a = PErrorT { runPErrorT :: m (Either ParseException a) }
9797instance Monad m => Functor (PErrorT m) where