darcs

Issue 2585 possibly remove impossible.h

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

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

Files
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
Messages
msg20072 (view) Author: bfrk 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
2b7ad88374d66232076a6ded1885e19759d0ea8d  
darcs: can't mix match and pending flags
CallStack (from HasCallStack):
  error, called at src/Darcs/UI/Commands/ShowFiles.hs:135:26 in
darcs-2.13.0-inplace:Darcs.UI.Commands.ShowFiles

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
Darcs.Util.Printer:

~~~
 errorDoc :: Doc -> a
-errorDoc x = unsafePerformIO $ do
-   stack <- currentCallStack
-   throwIO $ ErrorCall $ renderString $ x $$ vcat (map text stack)
+errorDoc x = error $ renderString x
~~~
Attachments
History
Date User Action Args
2018-03-29 08:10:39bfrkcreate
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:02bfrksetstatus: unknown -> resolved
resolvedin: 2.14.2
milestone: 2.14.2