on master help sign in
Added more cases to prettyPrintParseException.
fba712dDaniel Díaz
Data/Yaml/Internal.hs+11
@@ -80,6 +80,17 @@ prettyPrintParseException (AesonException e) =
80prettyPrintParseException CyclicIncludes = "Cyclic includes"
80prettyPrintParseException CyclicIncludes = "Cyclic includes"
81prettyPrintParseException (OtherParseException e) =
81prettyPrintParseException (OtherParseException e) =
82 "Parse exception: " ++ show e
82 "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
83prettyPrintParseException pe = show pe
94prettyPrintParseException pe = show pe
84
95
85newtype PErrorT m a = PErrorT { runPErrorT :: m (Either ParseException a) }
96newtype PErrorT m a = PErrorT { runPErrorT :: m (Either ParseException a) }