[project @ 2001-07-24 16:04:21 by simonpj]
[ghc-hetmet.git] / ghc / lib / std / PrelErr.lhs
index 5fda6d6..0523aae 100644 (file)
@@ -1,5 +1,7 @@
+% -----------------------------------------------------------------------------
+% $Id: PrelErr.lhs,v 1.20 2001/07/24 16:04:21 simonpj Exp $
 %
-% (c) The AQUA Project, Glasgow University, 1994-1996
+% (c) The University of Glasgow, 1994-2000
 %
 
 \section[PrelErr]{Module @PrelErr@}
@@ -26,9 +28,11 @@ 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
        
+       , undefined                -- :: a
        ) where
 
 import PrelBase
@@ -46,6 +50,16 @@ import PrelException
 -- error stops execution and displays an error message
 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. 
+
+undefined :: a
+undefined =  error "Prelude.undefined"
 \end{code}
 
 %*********************************************************