Skip to content

Commit

Permalink
fix error message for unmatched parameterized type variable
Browse files Browse the repository at this point in the history
Consider the following type error:

    def ('!') ({}) ([$.UnaryTypeVariable ('f') ($.String)]) (() => 8) ()

Incorrect error message (before):

    Type-variable constraint violation

    ! :: () -> f String
               ^^^^^^^^
                  1

    1)  8 :: Number

    Since there is no type of which all the above values are members,
    the type-variable constraint has been violated.

Correct error message (after):

    Invalid value

    ! :: () -> f String
               ^^^^^^^^
                  1

    1)  8 :: Number

    The value at position 1 is not a member of ‘f String’.
  • Loading branch information
davidchambers committed Apr 2, 2019
1 parent f9d9a36 commit 9d1c269
Show file tree
Hide file tree
Showing 2 changed files with 254 additions and 94 deletions.
Loading

0 comments on commit 9d1c269

Please sign in to comment.