Many language processors make assumptions after detecting an error. If the
assumptions are invalid, a compiler may issue a cascade of error messages i
n which only the first represents a true error in the input; later messages
are side effects of the original error. Eliminating such spurious error me
ssages requires keeping track of values within the compiler that are not av
ailable because of a previously detected error Examples include symbol-tabl
e entries, types and intermediate code, This paper presents a discipline fa
r tracking unavailable values and avoiding cascading error messages. The di
scipline extends the error monad of Spivey [1] and Wadler [2]. The extensio
n is expressed formally as a type constructor and combinators written in St
andard ML. The type constructor distinguishes intermediate results that are
unavailable because of a previously detected error. The combinators transf
orm ordinary functions, which assume all intermediate results are available
, into functions that silently propagate the unavailability of intermediate
results. In an ML implementation, the ML type rules enforce the discipline
; if the compiler writer does not account for a potentially unavailable val
ue, the source code of the compiler does not type-check. The cost of the di
scipline is negligible. In an experimental compiler, the discipline adds at
most 5-10% to the total compile time, and about 1% in the common case in w
hich no errors are detected.