Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#10040 closed bug (fixed)

Add hint on typed-hole error message

Reported by: simonpj Owned by:
Priority: normal Milestone: 8.0.1
Component: Compiler Version: 7.8.4
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


If you write

f flag = _flag + 4

it's possible that you didn't intend a typed hole; you just mis-typed _flag. So I propose to add hint to the error message saying that

    Found hole ‘_flag’ with type: t
    Where: ...blah blah...
    Or perhaps ‘_flag’ is mis-spelled, or not in scope
    Relevant bindings include it :: t (bound at <interactive>:9:1)

The third line is the new one.

See this email trail.

Change History (3)

comment:1 Changed 5 years ago by Simon Peyton Jones <simonpj@…>

In 276da7929c187f007c198a38e88bdad91866e500/ghc:

Improve error message on typed holes, and user manual (Tradc #10040)

comment:2 Changed 5 years ago by simonpj

Resolution: fixed
Status: newclosed

comment:3 Changed 4 years ago by thomie

Milestone: 8.0.1
Note: See TracTickets for help on using tickets.