-
-tcDelay :: RecTcEnv -> SDoc -> a -> TcM a -> NF_TcM a
-tcDelay unf_env doc bad_ans thing_inside
- = forkNF_Tc (
- recoverNF_Tc bad_value (
- tcSetEnv unf_env thing_inside
- ))
- where
- -- The trace tells what wasn't available, for the benefit of
- -- compiler hackers who want to improve it!
- bad_value = getErrsTc `thenNF_Tc` \ (warns,errs) ->
- returnNF_Tc (pprTrace "Failed:"
- (hang doc 4 (pprBagOfErrors errs))
- bad_ans)