Skip to content

Easy way to defer type errors

A number of comments I've heard recently have focused on the joy of -fdefer-type-errors, especially for newcomers to Haskell. However, in GHCi, one has to

  1. be aware that -fdefer-type-errors exists
  2. know the :set ... syntax to turn it on, and then
  3. is stuck with this setting on until they turn it off

Instead, I propose new :load! and :reload! commands (abbreviated to :l! and :r!) which turn on -fdefer-type-errors just for that one command. When a load or reload fails, the error message could suggest these alternate forms.

Trac metadata
Trac field Value
Version 7.6.3
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information