finally got Haskell test code working; most tests fail