% Reporting bugs in darcs.  See also impossible.h.

\begin{code}
module Darcs.Bug ( bug, bugDoc ) where

import Printer ( Doc, errorDoc, text, ($$) )
\end{code}

\begin{code}
bug :: String -> a
bug s = error $ "bug in darcs!\n" ++ s ++
                "\nPlease report this to bugs@darcs.net," ++
                "\nIf possible include the output of 'darcs --exact-version'."

bugDoc :: Doc -> a
bugDoc s = errorDoc $ text "bug in darcs!"
                   $$ s
                   $$ text "Please report this to bugs@darcs.net"
                   $$ text "If possible include the output of 'darcs --exact-version'."
\end{code}
