Opened 7 years ago

Closed 7 years ago

#5917 closed feature request (fixed)

Don't defer type errors when evaluating a GHCi expression

Reported by: parcs Owned by:
Priority: normal Milestone:
Component: GHCi Version: 7.5
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:



I have attached a patch that alters the behavior of GHCi to not defer type errors when evaluating an expression. My rationale is given within the patch.

Attachments (1)

0001-Don-t-defer-type-errors-when-evaluating-a-GHCi-expre.patch (1.6 KB) - added by parcs 7 years ago.

Download all attachments as: .zip

Change History (2)

comment:1 Changed 7 years ago by simonpj

difficulty: Unknown
Resolution: fixed
Status: newclosed

Good idea thanks

commit 301a718b8f9dd50d91bd03bbd2c3efa28ad203fd
Author: Patrick Palka <>
Date:   Tue Mar 6 19:27:40 2012 -0500

    Don't defer type errors when evaluating a GHCi expression
    It is unhelpful here because the expression will get evaluated right
    away anyway, thus emitting a redundant warning followed by an equivalent
    runtime exception. If the expression were an ill-typed pure expression,
    _three_ equivalent type errors would get emitted (due to the two-phase
    typechecking done in 'Plan C')
Note: See TracTickets for help on using tickets.