workaround for ghc bug https://ghc.haskell.org/trac/ghc/ticket/8836
lots of tests, etc