X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fstd%2FPrelErr.lhs;h=53daf0314bf5d1a88ec1c0bc2c640cb7734bfa75;hb=20f50b2a3651ce7dacdcb86a83afb5c5d444cb0b;hp=cd6a56f5f8014eb59e6ae3437ecaad084c54a903;hpb=d9af408e5c512501cfa991f5e4a76c9154bca917;p=ghc-hetmet.git diff --git a/ghc/lib/std/PrelErr.lhs b/ghc/lib/std/PrelErr.lhs index cd6a56f..53daf03 100644 --- a/ghc/lib/std/PrelErr.lhs +++ b/ghc/lib/std/PrelErr.lhs @@ -1,5 +1,5 @@ % ----------------------------------------------------------------------------- -% $Id: PrelErr.lhs,v 1.19 2001/05/18 16:54:05 simonmar Exp $ +% $Id: PrelErr.lhs,v 1.21 2001/07/24 16:09:48 simonpj Exp $ % % (c) The University of Glasgow, 1994-2000 % @@ -28,6 +28,7 @@ module PrelErr , 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 PrelException 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.