       nf()
 
     test 'throw function arguments mismatch', ->
-      throws ->
-        parse """
-          f :: Number -> Number = (n :: Number) :: Number ->  n * n
-          (f "hello")
-        """
+      shouldBeTypeError """
+        f :: Number -> Number = (n :: Number) :: Number ->  n * n
+        (f "hello")
+      """
 
     test 'void keyword', ->
       f :: Number -> Number = (n :: Number) :: Number ->  n * n
       x :: Number = (f 3)
 
     test 'throw function arguments mismatch', ->
-      throws ->
-        parse """
-          f :: Number -> Number = (n :: Number) :: Number ->  n * n
-          y :: String = (f 3)
-        """
+      shouldBeTypeError """
+        f :: Number -> Number = (n :: Number) :: Number ->  n * n
+        y :: String = (f 3)
+      """
 
     test 'typed array', ->
       struct Point {

reporter = require '../lib/reporter'
parse = (coffee) ->
  reporter.errors = []
  parse coffee

suite 'TypeChecker', ->
  setup ->

        3

    test 'throw function return type mismatch', ->
      shouldBeTypeError """
      f0 :: () -> Number = () :: Number -> ''
      """

    test 'throw function return type mismatch', ->
      shouldBeTypeError """
      f2 :: () -> Number = ->
        return ""
      """
