Skip to content

When importCompactByteStrings returns Nothing is unclear

Documentation of GHC.Compact.Serialized.importCompactByteStrings:

Convenience function for importing a compact region that is represented by a list of strict 'ByteString's.

This says nothing about when it returns nothing. Type of the function:

importCompactByteStrings :: SerializedCompact a -> [ByteString.ByteString] -> IO (Maybe (Compact a))

Looking at the code, this calls the function sanityCheckByteStrings and when it returns False, importCompactByteStrings returns Nothing. However it's also unclear what does sanityCheckByteStrings do.

We should document what does it mean for importCompactByteStrings to return Nothing.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information