From b706340c451952adf230b5b8daecad8a1f34d714 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 26 Apr 2002 12:48:17 +0000 Subject: [PATCH] [project @ 2002-04-26 12:48:16 by simonmar] - Add proper module headers to these guys - Remove \$Id\$ - Update copyrights - Int.lhs and Word.lhs were just wrapped in \begin{code}..\end{code}, so make them .hs files instead. --- GHC/Arr.lhs | 26 +++++++++++++------------- GHC/Base.lhs | 20 +++++++++++++------- GHC/Conc.lhs | 24 +++++++++++++----------- GHC/Enum.lhs | 25 ++++++++++++++----------- GHC/Err.lhs | 34 +++++++++++++++++++--------------- GHC/Exception.lhs | 21 +++++++++++++-------- GHC/Exts.hs | 12 +++++------- GHC/Float.lhs | 31 +++++++++++++------------------ GHC/Handle.hs | 15 +++++++++++---- GHC/IO.hs | 14 +++++++++++--- GHC/IOBase.lhs | 22 +++++++++++++--------- GHC/{Int.lhs => Int.hs} | 20 +++++++++++++------- GHC/List.lhs | 23 +++++++++++++---------- GHC/Num.lhs | 30 +++++++++++++----------------- GHC/PArr.hs | 14 +++++++++----- GHC/Pack.lhs | 33 ++++++++++++++++++--------------- GHC/Posix.hs | 13 +++++++++++-- GHC/Ptr.lhs | 19 +++++++++++++------ GHC/Read.lhs | 23 +++++++++++++---------- GHC/Real.lhs | 34 ++++++++++++++-------------------- GHC/ST.lhs | 21 +++++++++++++-------- GHC/STRef.lhs | 14 ++++++++++++++ GHC/Show.lhs | 22 +++++++++++++--------- GHC/Stable.lhs | 21 +++++++++++++-------- GHC/Storable.lhs | 21 +++++++++++++-------- GHC/TopHandler.lhs | 35 ++++++++++++++++++----------------- GHC/Weak.lhs | 21 +++++++++++++-------- GHC/{Word.lhs => Word.hs} | 21 ++++++++++++++------- 28 files changed, 366 insertions(+), 263 deletions(-) rename GHC/{Int.lhs => Int.hs} (98%) rename GHC/{Word.lhs => Word.hs} (98%) diff --git a/GHC/Arr.lhs b/GHC/Arr.lhs index ac43d2b..f69fa94 100644 --- a/GHC/Arr.lhs +++ b/GHC/Arr.lhs @@ -1,18 +1,18 @@ -% ----------------------------------------------------------------------------- -% $Id: Arr.lhs,v 1.3 2002/04/01 09:19:18 simonpj Exp $ -% -% (c) The University of Glasgow, 1994-2000 -% - -\section[GHC.Arr]{Module @GHC.Arr@} - -Array implementation, @GHC.Arr@ exports the basic array -types and operations. - -For byte-arrays see @GHC.ByteArr@. - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Arr +-- Copyright : (c) The University of Glasgow, 1994-2000 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC extensions) +-- +-- GHC's array implementation. +-- +----------------------------------------------------------------------------- module GHC.Arr where diff --git a/GHC/Base.lhs b/GHC/Base.lhs index 7c43dc3..b19e83a 100644 --- a/GHC/Base.lhs +++ b/GHC/Base.lhs @@ -1,11 +1,5 @@ -% ----------------------------------------------------------------------------- -% $Id: Base.lhs,v 1.8 2002/04/24 16:10:21 simonmar Exp $ -% -% (c) The University of Glasgow, 1992-2002 -% \section[GHC.Base]{Module @GHC.Base@} - The overall structure of the GHC Prelude is a bit tricky. a) We want to avoid "orphan modules", i.e. ones with instance @@ -71,9 +65,21 @@ GHC.ByteArr Types: ByteArray, MutableByteArray Other Prelude modules are much easier with fewer complex dependencies. - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Base +-- Copyright : (c) The University of Glasgow, 1992-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC extensions) +-- +-- Basic data types and classes. +-- +----------------------------------------------------------------------------- #include "MachDeps.h" diff --git a/GHC/Conc.lhs b/GHC/Conc.lhs index 669be48..b6d7be5 100644 --- a/GHC/Conc.lhs +++ b/GHC/Conc.lhs @@ -1,15 +1,17 @@ -% ----------------------------------------------------------------------------- -% $Id: Conc.lhs,v 1.4 2002/04/10 11:43:49 stolz Exp $ -% -% (c) The University of Glasgow, 1994-2000 -% - -\section[GHC.Conc]{Module @GHC.Conc@} - -Basic concurrency stuff - -\begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Conc +-- Copyright : (c) The University of Glasgow, 1994-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC extensions) +-- +-- Basic concurrency stuff. +-- +----------------------------------------------------------------------------- module GHC.Conc ( ThreadId(..) diff --git a/GHC/Enum.lhs b/GHC/Enum.lhs index e0a7a4b..93af9eb 100644 --- a/GHC/Enum.lhs +++ b/GHC/Enum.lhs @@ -1,21 +1,24 @@ -% ----------------------------------------------------------------------------- -% $Id: Enum.lhs,v 1.7 2002/02/05 17:32:26 simonmar Exp $ -% -% (c) The University of Glasgow, 1992-2000 -% - -\section[GHC.Bounded]{Module @GHC.Bounded@} - -Instances of Bounded for various datatypes. - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Enum +-- Copyright : (c) The University of Glasgow, 1992-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC extensions) +-- +-- The 'Enum' and 'Bounded' classes. +-- +----------------------------------------------------------------------------- module GHC.Enum( Bounded(..), Enum(..), boundedEnumFrom, boundedEnumFromThen, - -- Instances for Bounded and Eum: (), Char, Int + -- Instances for Bounded and Enum: (), Char, Int ) where diff --git a/GHC/Err.lhs b/GHC/Err.lhs index fb34ab5..e7abb0c 100644 --- a/GHC/Err.lhs +++ b/GHC/Err.lhs @@ -1,20 +1,24 @@ -% ----------------------------------------------------------------------------- -% $Id: Err.lhs,v 1.4 2002/04/11 12:03:43 simonpj Exp $ -% -% (c) The University of Glasgow, 1994-2000 -% - -\section[GHC.Err]{Module @GHC.Err@} - -The GHC.Err module defines the code for the wired-in error functions, -which have a special type in the compiler (with "open tyvars"). - -We cannot define these functions in a module where they might be used -(e.g., GHC.Base), because the magical wired-in type will get confused -with what the typechecker figures out. - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Err +-- Copyright : (c) The University of Glasgow, 1994-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC extensions) +-- +-- The "GHC.Err" module defines the code for the wired-in error functions, +-- which have a special type in the compiler (with \"open tyvars\"). +-- +-- We cannot define these functions in a module where they might be used +-- (e.g., "GHC.Base"), because the magical wired-in type will get confused +-- with what the typechecker figures out. +-- +----------------------------------------------------------------------------- + module GHC.Err ( irrefutPatError diff --git a/GHC/Exception.lhs b/GHC/Exception.lhs index 50af792..7979d4d 100644 --- a/GHC/Exception.lhs +++ b/GHC/Exception.lhs @@ -1,13 +1,18 @@ -% ------------------------------------------------------------------------------ -% $Id: Exception.lhs,v 1.3 2002/02/05 17:32:26 simonmar Exp $ -% -% (c) The University of Glasgow, 1998-2000 -% - -Exceptions and exception-handling functions. - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Exception +-- Copyright : (c) The University of Glasgow, 1998-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC extensions) +-- +-- Exceptions and exception-handling functions. +-- +----------------------------------------------------------------------------- #ifndef __HUGS__ module GHC.Exception diff --git a/GHC/Exts.hs b/GHC/Exts.hs index 4041fda..a1e6db9 100644 --- a/GHC/Exts.hs +++ b/GHC/Exts.hs @@ -1,14 +1,12 @@ ----------------------------------------------------------------------------- -- | -- Module : GHC.Exts --- Copyright : (c) The University of Glasgow 2001 --- License : BSD-style (see the file libraries/core/LICENSE) +-- Copyright : (c) The University of Glasgow 2002 +-- License : see libraries/base/LICENSE -- --- Maintainer : libraries@haskell.org --- Stability : experimental --- Portability : non-portable --- --- $Id: Exts.hs,v 1.5 2002/04/24 16:31:45 simonmar Exp $ +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) -- -- GHC Extensions: this is the Approved Way to get at GHC-specific stuff. -- diff --git a/GHC/Float.lhs b/GHC/Float.lhs index d16ebeb..382ef64 100644 --- a/GHC/Float.lhs +++ b/GHC/Float.lhs @@ -1,23 +1,18 @@ -% ------------------------------------------------------------------------------ -% $Id: Float.lhs,v 1.5 2002/02/27 14:33:09 simonmar Exp $ -% -% (c) The University of Glasgow, 1994-2000 -% - -\section[GHC.Num]{Module @GHC.Num@} - -The types - - Float - Double - -and the classes - - Floating - RealFloat - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Float +-- Copyright : (c) The University of Glasgow 1994-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- The types 'Float' and 'Double', and the classes 'Floating' and 'RealFloat'. +-- +----------------------------------------------------------------------------- #include "ieee-flpt.h" diff --git a/GHC/Handle.hs b/GHC/Handle.hs index c29c6c9..c927e13 100644 --- a/GHC/Handle.hs +++ b/GHC/Handle.hs @@ -3,12 +3,19 @@ #undef DEBUG_DUMP #undef DEBUG --- ----------------------------------------------------------------------------- --- $Id: Handle.hs,v 1.6 2002/03/26 17:06:32 simonmar Exp $ +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Handle +-- Copyright : (c) The University of Glasgow, 1994-2001 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : libraries@haskell.org +-- Stability : internal +-- Portability : non-portable -- --- (c) The University of Glasgow, 1994-2001 +-- This module defines the basic operations on I\/O \"handles\". -- --- This module defines the basic operations on I/O "handles". +----------------------------------------------------------------------------- module GHC.Handle ( withHandle, withHandle', withHandle_, diff --git a/GHC/IO.hs b/GHC/IO.hs index 53fe060..32018e9 100644 --- a/GHC/IO.hs +++ b/GHC/IO.hs @@ -2,11 +2,19 @@ #undef DEBUG_DUMP --- ----------------------------------------------------------------------------- --- $Id: IO.hs,v 1.6 2002/03/18 14:03:20 simonmar Exp $ +----------------------------------------------------------------------------- +-- | +-- Module : GHC.IO +-- Copyright : (c) The University of Glasgow, 1992-2001 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : libraries@haskell.org +-- Stability : internal +-- Portability : non-portable -- --- (c) The University of Glasgow, 1992-2001 +-- String I\/O functions -- +----------------------------------------------------------------------------- module GHC.IO ( hWaitForInput, hGetChar, hGetLine, hGetContents, hPutChar, hPutStr, diff --git a/GHC/IOBase.lhs b/GHC/IOBase.lhs index e1b8ec3..9c2c034 100644 --- a/GHC/IOBase.lhs +++ b/GHC/IOBase.lhs @@ -1,14 +1,18 @@ -% ------------------------------------------------------------------------------ -% $Id: IOBase.lhs,v 1.8 2002/04/11 12:03:44 simonpj Exp $ -% -% (c) The University of Glasgow, 1994-2001 -% - -% Definitions for the @IO@ monad and its friends. Everything is exported -% concretely; the @IO@ module itself exports abstractly. - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.IOBase +-- Copyright : (c) The University of Glasgow 1994-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- Definitions for the 'IO' monad and its friends. +-- +----------------------------------------------------------------------------- module GHC.IOBase where diff --git a/GHC/Int.lhs b/GHC/Int.hs similarity index 98% rename from GHC/Int.lhs rename to GHC/Int.hs index 6fc4c16..cd12594 100644 --- a/GHC/Int.lhs +++ b/GHC/Int.hs @@ -1,10 +1,17 @@ -% -% (c) The University of Glasgow, 1997-2001 -% -\section[GHC.Int]{Module @GHC.Int@} - -\begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Int +-- Copyright : (c) The University of Glasgow 1997-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- The sized integral datatypes, 'Int8', 'Int16', 'Int32', and 'Int64'. +-- +----------------------------------------------------------------------------- #include "MachDeps.h" @@ -780,4 +787,3 @@ instance Ix Int64 where unsafeIndex b@(m,_) i = fromIntegral (i - m) inRange (m,n) i = m <= i && i <= n unsafeRangeSize b@(_l,h) = unsafeIndex b h + 1 -\end{code} diff --git a/GHC/List.lhs b/GHC/List.lhs index 4aa2fd1..426fad0 100644 --- a/GHC/List.lhs +++ b/GHC/List.lhs @@ -1,15 +1,18 @@ -% ------------------------------------------------------------------------------ -% $Id: List.lhs,v 1.6 2002/02/05 17:32:26 simonmar Exp $ -% -% (c) The University of Glasgow, 1994-2000 -% - -\section[GHC.List]{Module @GHC.List@} - -The List data type and its operations - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.List +-- Copyright : (c) The University of Glasgow 1994-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- The List data type and its operations +-- +----------------------------------------------------------------------------- module GHC.List ( [] (..), diff --git a/GHC/Num.lhs b/GHC/Num.lhs index 52c2a7b..8e9c662 100644 --- a/GHC/Num.lhs +++ b/GHC/Num.lhs @@ -1,22 +1,18 @@ -% ------------------------------------------------------------------------------ -% $Id: Num.lhs,v 1.4 2002/02/05 17:32:26 simonmar Exp $ -% -% (c) The University of Glasgow, 1994-2000 -% - -\section[GHC.Num]{Module @GHC.Num@} - -The class - - Num - -and the type - - Integer - - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Num +-- Copyright : (c) The University of Glasgow 1994-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- The 'Num' class and the 'Integer' type. +-- +----------------------------------------------------------------------------- #include "MachDeps.h" #if SIZEOF_HSWORD == 4 diff --git a/GHC/PArr.hs b/GHC/PArr.hs index bb5910e..7e0f732 100644 --- a/GHC/PArr.hs +++ b/GHC/PArr.hs @@ -1,13 +1,17 @@ {-# OPTIONS -fparr #-} --- $Id: PArr.hs,v 1.2 2002/02/12 10:50:37 simonmar Exp $ --- --- Copyright (c) [2001..2002] Manuel M T Chakravarty & Gabriele Keller +----------------------------------------------------------------------------- +-- | +-- Module : GHC.PArr +-- Copyright : (c) 2001-2002 Manuel M T Chakravarty & Gabriele Keller +-- License : see libraries/base/LICENSE +-- +-- Maintainer : Manuel M. T. Chakravarty +-- Stability : internal +-- Portability : non-portable (GHC Extensions) -- -- Basic implementation of Parallel Arrays. -- ---- DESCRIPTION --------------------------------------------------------------- --- -- This module has two functions: (1) It defines the interface to the -- parallel array extension of the Prelude and (2) it provides a vanilla -- implementation of parallel arrays that does not require to flatten the diff --git a/GHC/Pack.lhs b/GHC/Pack.lhs index 081a390..d63b4e0 100644 --- a/GHC/Pack.lhs +++ b/GHC/Pack.lhs @@ -1,20 +1,23 @@ -% ------------------------------------------------------------------------------ -% $Id: Pack.lhs,v 1.2 2001/09/14 11:25:24 simonmar Exp $ -% -% (c) The University of Glasgow, 1997-2000 -% - -\section[GHC.Pack]{Packing/unpacking bytes} - -This module provides a small set of low-level functions for packing -and unpacking a chunk of bytes. Used by code emitted by the compiler -plus the prelude libraries. - -The programmer level view of packed strings is provided by a GHC -system library PackedString. - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Pack +-- Copyright : (c) The University of Glasgow 1997-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- This module provides a small set of low-level functions for packing +-- and unpacking a chunk of bytes. Used by code emitted by the compiler +-- plus the prelude libraries. +-- +-- The programmer level view of packed strings is provided by a GHC +-- system library PackedString. +-- +----------------------------------------------------------------------------- module GHC.Pack ( diff --git a/GHC/Posix.hs b/GHC/Posix.hs index f46b6cf..3c0553d 100644 --- a/GHC/Posix.hs +++ b/GHC/Posix.hs @@ -1,12 +1,21 @@ {-# OPTIONS -fno-implicit-prelude #-} --- --------------------------------------------------------------------------- --- $Id: Posix.hs,v 1.6 2002/03/26 10:53:03 simonmar Exp $ +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Posix +-- Copyright : (c) The University of Glasgow, 1992-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable -- -- POSIX support layer for the standard libraries -- -- Non-posix compliant in order to support the following features: -- * S_ISSOCK (no sockets in POSIX) +-- +----------------------------------------------------------------------------- module GHC.Posix where diff --git a/GHC/Ptr.lhs b/GHC/Ptr.lhs index 0bf1520..5c6191f 100644 --- a/GHC/Ptr.lhs +++ b/GHC/Ptr.lhs @@ -1,12 +1,19 @@ +\begin{code} +{-# OPTIONS -fno-implicit-prelude #-} ----------------------------------------------------------------------------- --- $Id: Ptr.lhs,v 1.3 2002/04/24 16:31:45 simonmar Exp $ --- --- (c) The FFI Task Force, 2000 -- | --- Module GHC.Ptr +-- Module : GHC.Ptr +-- Copyright : (c) The FFI Task Force, 2000-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : ffi@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- The 'Ptr' and 'FunPtr' types and operations. +-- +----------------------------------------------------------------------------- -\begin{code} -{-# OPTIONS -fno-implicit-prelude #-} module GHC.Ptr where import GHC.Base diff --git a/GHC/Read.lhs b/GHC/Read.lhs index 6a23d61..acc7ea2 100644 --- a/GHC/Read.lhs +++ b/GHC/Read.lhs @@ -1,15 +1,18 @@ -% ------------------------------------------------------------------------------ -% $Id: Read.lhs,v 1.6 2002/04/13 14:59:06 panne Exp $ -% -% (c) The University of Glasgow, 1994-2000 -% - -\section[GHC.Read]{Module @GHC.Read@} - -Instances of the Read class. - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Read +-- Copyright : (c) The FFI Task Force, 1994-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- The 'Read' class and instances for basic data types. +-- +----------------------------------------------------------------------------- module GHC.Read ( Read(..) -- class diff --git a/GHC/Real.lhs b/GHC/Real.lhs index 98edd2e..13be142 100644 --- a/GHC/Real.lhs +++ b/GHC/Real.lhs @@ -1,25 +1,19 @@ -% ------------------------------------------------------------------------------ -% $Id: Real.lhs,v 1.3 2002/02/12 15:51:26 simonmar Exp $ -% -% (c) The University of Glasgow, 1994-2000 -% - -\section[GHC.Real]{Module @GHC.Real@} - -The types - - Ratio, Rational - -and the classes - - Real - Integral - Fractional - RealFrac - - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Real +-- Copyright : (c) The FFI Task Force, 1994-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- The types 'Ratio' and 'Rational', and the classes 'Real', 'Fractional', +-- 'Integral', and 'RealFrac'. +-- +----------------------------------------------------------------------------- module GHC.Real where diff --git a/GHC/ST.lhs b/GHC/ST.lhs index c36292c..ab1a1b1 100644 --- a/GHC/ST.lhs +++ b/GHC/ST.lhs @@ -1,13 +1,18 @@ -% ------------------------------------------------------------------------------ -% $Id: ST.lhs,v 1.2 2001/12/21 15:07:25 simonmar Exp $ -% -% (c) The University of Glasgow, 1992-2000 -% - -\section[GHC.ST]{The @ST@ monad} - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.ST +-- Copyright : (c) The University of Glasgow, 1992-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- The 'ST' Monad. +-- +----------------------------------------------------------------------------- module GHC.ST where diff --git a/GHC/STRef.lhs b/GHC/STRef.lhs index 7145932..fa96db3 100644 --- a/GHC/STRef.lhs +++ b/GHC/STRef.lhs @@ -1,5 +1,19 @@ \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.STRef +-- Copyright : (c) The University of Glasgow, 1994-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- References in the 'ST' monad. +-- +----------------------------------------------------------------------------- + module GHC.STRef where import GHC.ST diff --git a/GHC/Show.lhs b/GHC/Show.lhs index b0265be..dd931b8 100644 --- a/GHC/Show.lhs +++ b/GHC/Show.lhs @@ -1,14 +1,18 @@ -% ------------------------------------------------------------------------------ -% $Id: Show.lhs,v 1.5 2002/04/11 12:03:44 simonpj Exp $ -% -% (c) The University of Glasgow, 1992-2000 -% - -\section{Module @GHC.Show@} - - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Show +-- Copyright : (c) The University of Glasgow, 1992-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- The 'Show' class, and related operations. +-- +----------------------------------------------------------------------------- module GHC.Show ( diff --git a/GHC/Stable.lhs b/GHC/Stable.lhs index b7c0d65..80af1f2 100644 --- a/GHC/Stable.lhs +++ b/GHC/Stable.lhs @@ -1,13 +1,18 @@ -% ----------------------------------------------------------------------------- -% $Id: Stable.lhs,v 1.3 2002/04/24 15:47:34 simonmar Exp $ -% -% (c) The GHC Team, 1992-2000 -% - -\section{Module @GHC.Stable@} - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Stable +-- Copyright : (c) The University of Glasgow, 1992-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : ffi@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- Stable pointers. +-- +----------------------------------------------------------------------------- module GHC.Stable ( StablePtr(..) diff --git a/GHC/Storable.lhs b/GHC/Storable.lhs index f0c44e4..7ffadf8 100644 --- a/GHC/Storable.lhs +++ b/GHC/Storable.lhs @@ -1,13 +1,18 @@ -% ----------------------------------------------------------------------------- -% $Id: Storable.lhs,v 1.4 2002/02/05 17:32:27 simonmar Exp $ -% -% (c) The FFI task force, 2000 -% - -A class for primitive marshaling - \begin{code} {-# OPTIONS -fno-implicit-prelude -monly-3-regs #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Storable +-- Copyright : (c) The FFI task force, 2000-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : ffi@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- The 'Storable' class. +-- +----------------------------------------------------------------------------- #include "MachDeps.h" diff --git a/GHC/TopHandler.lhs b/GHC/TopHandler.lhs index 75d7b81..7750566 100644 --- a/GHC/TopHandler.lhs +++ b/GHC/TopHandler.lhs @@ -1,23 +1,20 @@ --- ----------------------------------------------------------------------------- --- $Id: TopHandler.lhs,v 1.6 2002/03/11 14:53:51 simonmar Exp $ --- --- (c) The University of Glasgow, 2001 +\begin{code} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.TopHandler +-- Copyright : (c) The University of Glasgow, 2001-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) -- --- GHC.TopHandler +-- Top-level IO actions want to catch exceptions (e.g., 'forkIO' and +-- 'GHC.Main.mainIO') and report them - 'topHandler' is the exception +-- handler they should use for this. -- --- 'Top-level' IO actions want to catch exceptions (e.g., forkIO and --- GHC.Main.mainIO) and report them - topHandler is the exception --- handler they should use for this: - --- make sure we handle errors while reporting the error! --- (e.g. evaluating the string passed to 'error' might generate --- another error, etc.) +----------------------------------------------------------------------------- --- These functions can't go in GHC.Main, because GHC.Main isn't --- included in HSstd.o (because GHC.Main depends on Main, which --- doesn't exist yet...). - -\begin{code} module GHC.TopHandler ( runMain, reportStackOverflow, reportError ) where @@ -38,6 +35,10 @@ runMain main = catchException (main >> return ()) topHandler topHandler :: Exception -> IO () topHandler err = catchException (real_handler err) topHandler +-- Make sure we handle errors while reporting the error! +-- (e.g. evaluating the string passed to 'error' might generate +-- another error, etc.) +-- real_handler :: Exception -> IO () real_handler ex = case ex of diff --git a/GHC/Weak.lhs b/GHC/Weak.lhs index 25515ba..9b85f54 100644 --- a/GHC/Weak.lhs +++ b/GHC/Weak.lhs @@ -1,13 +1,18 @@ -% ------------------------------------------------------------------------------ -% $Id: Weak.lhs,v 1.3 2001/12/21 15:07:25 simonmar Exp $ -% -% (c) The University of Glasgow, 1998-2000 -% - -\section[GHC.Weak]{Module @GHC.Weak@} - \begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Weak +-- Copyright : (c) The University of Glasgow, 1998-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- Weak pointers. +-- +----------------------------------------------------------------------------- module GHC.Weak where diff --git a/GHC/Word.lhs b/GHC/Word.hs similarity index 98% rename from GHC/Word.lhs rename to GHC/Word.hs index 5284f59..1850161 100644 --- a/GHC/Word.lhs +++ b/GHC/Word.hs @@ -1,10 +1,18 @@ -% -% (c) The University of Glasgow, 1997-2001 -% -\section[GHC.Word]{Module @GHC.Word@} - -\begin{code} {-# OPTIONS -fno-implicit-prelude #-} +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Word +-- Copyright : (c) The University of Glasgow, 1997-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC Extensions) +-- +-- Sized unsigned integral types: 'Word', 'Word8', 'Word16', 'Word32', and +-- 'Word64'. +-- +----------------------------------------------------------------------------- #include "MachDeps.h" @@ -880,4 +888,3 @@ instance Ix Word64 where instance Read Word64 where readsPrec p s = [(fromInteger x, r) | (x, r) <- readsPrec p s] -\end{code} -- 1.7.10.4