@@ -182,6 +182,7 @@ data ParseException = NonScalarKey
182 | InvalidYaml (Maybe YamlException)
182 | InvalidYaml (Maybe YamlException)
183 | AesonException String
183 | AesonException String
184 | OtherParseException SomeException
184 | OtherParseException SomeException
185+ | NonStringKeyAlias Y.AnchorName Value
185 deriving (Show, Typeable)
186 deriving (Show, Typeable)
186instance Exception ParseException
187instance Exception ParseException
@@ -302,6 +303,12 @@ parseM a front = do
302 CL.drop 1
303 CL.drop 1
303 s <- case me of
304 s <- case me of
304 Just (EventScalar v tag style a') -> parseScalar v a' style tag
305 Just (EventScalar v tag style a') -> parseScalar v a' style tag
306+ Just (EventAlias an) -> do
308+ case Map.lookup an m of
309+ Nothing -> liftIO $ throwIO $ UnknownAlias an
310+ Just (String t) -> return t
311+ Just v -> liftIO $ throwIO $ NonStringKeyAlias an v
305 _ -> liftIO $ throwIO $ UnexpectedEvent me Nothing
312 _ -> liftIO $ throwIO $ UnexpectedEvent me Nothing
306 o <- parseO
313 o <- parseO