on master help sign in
Added more cases to prettyPrintParseException.
commitfba712daa8eb3ed0b96f61a95ca589be74978ff2 authorDaniel Díaz <dhelta.diaz@gmail.com> dateSat 18 Apr 2015, 10:29 (12 years ago) parent91203d2
1 file changed+11
Data/Yaml/Internal.hs+11
Data/Yaml/Internal.hs+11
@@ -80,6 +80,17 @@ prettyPrintParseException (AesonException e) =
8080prettyPrintParseException CyclicIncludes = "Cyclic includes"
8181prettyPrintParseException (OtherParseException e) =
8282 "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+ ]
90+prettyPrintParseException (NonStringKeyAlias n v) = unlines
91+ [ "Non-string key alias:"
92+ , " Anchor name: " ++ n
93+ , " Value: " ++ show v
8394prettyPrintParseException pe = show pe
8495
8596newtype PErrorT m a = PErrorT { runPErrorT :: m (Either ParseException a) }