implementations of non-Haskell functions required by packages