Skip to content

Instantly share code, notes, and snippets.

@jeffreybaird
Created April 24, 2016 16:39
Show Gist options
  • Save jeffreybaird/dddfb90e60a32bf114d8052647b7c009 to your computer and use it in GitHub Desktop.
Save jeffreybaird/dddfb90e60a32bf114d8052647b7c009 to your computer and use it in GitHub Desktop.
-- TYPE MISMATCH -------------------------------------------- test/ball_test.elm
The 2nd argument to function `withinBrick` is causing a mismatch.
38│ Ball.withinBrick ball brick
^^^^^
Function `withinBrick` is expecting the 2nd argument to be:
{ color : Color.Color, vx : Float, vy : Float, x : Float, y : Float }
But it is:
{ color : Color.Color, vx : Float, vy : Float, x : Float, y : Float }
Hint: I always figure out the type of arguments from left to right. If an
argument is acceptable when I check it, I assume it is "correct" in subsequent
checks. So the problem may actually be in how previous arguments interact with
the 2nd.
-- TYPE MISMATCH -------------------------------------------- test/ball_test.elm
The 1st argument to function `withinBrick` is causing a mismatch.
38│ Ball.withinBrick ball brick
^^^^
Function `withinBrick` is expecting the 1st argument to be:
{ vx : Float, vy : Float, x : Float, y : Float }
But it is:
{ vx : Float, vy : Float, x : Float, y : Float }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment