From: simonmar Date: Tue, 31 Jul 2001 13:11:07 +0000 (+0000) Subject: [project @ 2001-07-31 13:11:07 by simonmar] X-Git-Tag: nhc98-1-18-release~1195 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e1550f94be21fa41bbc7bd13e19220d213133d9f;p=haskell-directory.git [project @ 2001-07-31 13:11:07 by simonmar] merge ghc/lib/std/PrelErr.lhs rev. 1.20 --- diff --git a/GHC/Err.lhs b/GHC/Err.lhs index c1aa78f..d3596ff 100644 --- a/GHC/Err.lhs +++ b/GHC/Err.lhs @@ -1,5 +1,5 @@ % ----------------------------------------------------------------------------- -% $Id: Err.lhs,v 1.1 2001/06/28 14:15:03 simonmar Exp $ +% $Id: Err.lhs,v 1.2 2001/07/31 13:11:07 simonmar Exp $ % % (c) The University of Glasgow, 1994-2000 % @@ -28,6 +28,7 @@ module GHC.Err , absentErr, parError -- :: a , seqError -- :: a + , errorCString -- :: Addr# -> a -- Arg is a ptr to C string , error -- :: String -> a , assertError -- :: String -> Bool -> a -> a @@ -50,6 +51,9 @@ import GHC.Exception error :: String -> a error s = throw (ErrorCall s) +errorCString :: Addr# -> a +errorCString s = error (unpackCString s) + -- It is expected that compilers will recognize this and insert error -- messages which are more appropriate to the context in which undefined -- appears.