Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/src/libraries/base/GHC/Err.lhs-boot

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


\begin{code}
{-# OPTIONS -fno-implicit-prelude #-}
---------------------------------------------------------------------------
--                  Ghc.Err.hs-boot
---------------------------------------------------------------------------

module GHC.Err( error, divZeroError, overflowError ) 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

-- overflow is needed quite early
overflowError :: a
\end{code}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].