test = do
  let rights = map typecheck testExprs
      lefts  = map typecheck failExprs
  putStrLn "rights:"
  mapM_ putStrLn $ zipWith report testExprs rights
  putStrLn "lefts:"
  mapM_ putStrLn $ zipWith report failExprs lefts
  guard (all isRight rights)
  guard (all isLeft lefts)
  putStrLn "\ntests passing."
test = do
  let rights = map typecheck testExprs
      lefts  = map typecheck failExprs
  putStrLn "rights:"
  mapM_ putStrLn $ zipWith report testExprs rights
  putStrLn "lefts:"
  mapM_ putStrLn $ zipWith report failExprs lefts
  guard (all isRight rights)
  guard (all isLeft lefts)
  putStrLn "\ntests passing."
test = do
  let rights = map typecheck testExprs
      lefts  = map typecheck failExprs
  putStrLn "rights:"
  mapM_ putStrLn $ zipWith report testExprs rights
  putStrLn "lefts:"
  mapM_ putStrLn $ zipWith report failExprs lefts
  guard (all isRight rights)
  guard (all isLeft lefts)
  putStrLn "\ntests passing."