[project @ 2005-01-27 10:45:47 by simonpj]
[ghc-base.git] / GHC / Err.lhs-boot
diff --git a/GHC/Err.lhs-boot b/GHC/Err.lhs-boot
new file mode 100644 (file)
index 0000000..70afbb9
--- /dev/null
@@ -0,0 +1,23 @@
+\begin{code}
+{-# OPTIONS -fno-implicit-prelude #-}
+---------------------------------------------------------------------------
+--                  Ghc.Err.hs-boot
+---------------------------------------------------------------------------
+
+module GHC.Err( error, divZeroError ) where
+
+-- The type signature for 'error' is a gross hack.
+-- First, we can't give an accurate type for error, because it mentions 
+-- an open type variable.
+-- Second, we can't even say error :: [Char] -> a, because Char is defined
+-- in GHC.Base, and that would make Err.lhs-boot mutually recursive 
+-- with GHC.Base.
+-- Fortunately it doesn't matter what type we give here because the 
+-- compiler will use its wired-in version.  But we have
+-- to mention 'error' so that it gets exported from this .hi-boot
+-- file.
+error    :: a
+
+-- divide by zero is needed quite early
+divZeroError :: a
+\end{code}