Because Haskell does not have native stack trace system (yet), I prefer to explicitly use HasCallStack. Or else users (if any) would struggle in nightmare on errors!
For vectors, be sure to use VGM.read / VGM.write, not VUM.read / VUM.write. Non-generic versions didn't getHasCallStack (for build time and performance assumption), and they weren't looked back.
For unzip, use boxed versions, which are $O(1)$.
HasCallStack can make the library slower, but I believe the call stack on error is much more important. Needless HasCallStack constraints should be removed though.
Because Haskell does not have native stack trace system (yet), I prefer to explicitly use
HasCallStack
. Or else users (if any) would struggle in nightmare on errors!For vectors, be sure to use
VGM.read
/VGM.write
, notVUM.read
/VUM.write
. Non-generic versions didn't getHasCallStack
(for build time and performance assumption), and they weren't looked back.HasCallStack
can make the library slower, but I believe the call stack on error is much more important. NeedlessHasCallStack
constraints should be removed though.