A LibHaskell rewrite with sane separation