Just noticed Streams are a kind of Dictionary too, since they have a header

This commit is contained in:
Tissevert 2020-02-15 10:23:32 +01:00
parent 4a6dbda7d3
commit b916ab5206

View file

@ -40,6 +40,7 @@ instance MonadFail Error where
castDictionary :: MonadFail m => Object -> m Dictionary
castDictionary (Direct (Dictionary aDict)) = return aDict
castDictionary (Stream {header}) = return header
castDictionary obj = expected "dictionary : " obj
castObjectId :: MonadFail m => DirectObject -> m ObjectId