Skip to content

Bad error on unknown handler #5304

@ChrisPenner

Description

@ChrisPenner

Given this code:

abilityMatchTests = do
  handle abort with asldkfjlkj

You get this error:

  The handler used here

      3 |   handle abort with asldkfjlkj

  has type _7 but I'm expecting a function of the form
  Request e a -> o.

It's weird it's saying it has a type, when it clearly doesn't resolve to anything at all.

I'd expect it to say "asldkfjlkj is not in scope, it should have type: Request {Abort} a -> a" or something like that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions