Issue 2585 possibly remove impossible.h

Title possibly remove impossible.h
Priority Status resolved
Milestone 2.14.2 STABLE Resolved in 2.14.2 STABLE
Superseder Nosy List bf
Assigned To

Created on 2018-03-29.08:10:39 by bf, last changed 2018-07-19.10:57:02 by bf.

File name Uploaded Type Edit Remove
simplify-errordoc-since-errors-are-shown-with-a-call-stack-in-ghc-8_.dpatch gh, 2018-03-29.21:14:15 application/octet-stream
msg20072 (view) Author: bf Date: 2018-03-29.08:10:37
I am lately getting errors in Darcs formatted as

ben@yuiitsu[2]:.../darcs/fileuuid>darcs show files -h
darcs: can't mix match and pending flags
CallStack (from HasCallStack):
  error, called at src/Darcs/UI/Commands/ShowFiles.hs:135:26 in

Apart from this being a bug (in two ways: it should not call error but
instead fail with a message intended for the user; and the message is
bogus since I only gave it one match flag):

Does that mean we no longer need impossible.h ?
msg20088 (view) Author: gh Date: 2018-03-29.21:14:15
I'm currently tinkering with this, starting with the following change in

 errorDoc :: Doc -> a
-errorDoc x = unsafePerformIO $ do
-   stack <- currentCallStack
-   throwIO $ ErrorCall $ renderString $ x $$ vcat (map text stack)
+errorDoc x = error $ renderString x
Date User Action Args
2018-03-29 08:10:39bfcreate
2018-03-29 21:14:17ghsetfiles: + simplify-errordoc-since-errors-are-shown-with-a-call-stack-in-ghc-8_.dpatch
messages: + msg20088
2018-07-19 10:57:02bfsetstatus: unknown -> resolved
milestone: 2.14.2 STABLE
resolvedin: 2.14.2 STABLE