From 8759db3e70f41a06afafaddbe3e04405ef92b540 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 18 Jan 2000 15:07:24 +0000 Subject: [PATCH] [project @ 2000-01-18 15:07:23 by simonmar] Remove old libraries documentation. --- ghc/docs/libraries/Addr.sgml | 68 ------ ghc/docs/libraries/Bits.sgml | 59 ----- ghc/docs/libraries/Concurrent.sgml | 415 ------------------------------------ ghc/docs/libraries/Dynamic.sgml | 162 -------------- ghc/docs/libraries/Exception.sgml | 206 ------------------ ghc/docs/libraries/Foreign.sgml | 73 ------- ghc/docs/libraries/GetOpt.sgml | 96 --------- ghc/docs/libraries/GlaExts.sgml | 31 --- ghc/docs/libraries/IOExts.sgml | 119 ----------- ghc/docs/libraries/Int.sgml | 112 ---------- ghc/docs/libraries/Makefile | 9 - ghc/docs/libraries/NumExts.sgml | 72 ------- ghc/docs/libraries/Pretty.sgml | 59 ----- ghc/docs/libraries/ST.sgml | 82 ------- ghc/docs/libraries/Stable.sgml | 126 ----------- ghc/docs/libraries/Weak.sgml | 278 ------------------------ ghc/docs/libraries/Word.sgml | 119 ----------- ghc/docs/libraries/libs.sgml | 126 ----------- ghc/docs/libraries/refs.bib | 113 ---------- 19 files changed, 2325 deletions(-) delete mode 100644 ghc/docs/libraries/Addr.sgml delete mode 100644 ghc/docs/libraries/Bits.sgml delete mode 100644 ghc/docs/libraries/Concurrent.sgml delete mode 100644 ghc/docs/libraries/Dynamic.sgml delete mode 100644 ghc/docs/libraries/Exception.sgml delete mode 100644 ghc/docs/libraries/Foreign.sgml delete mode 100644 ghc/docs/libraries/GetOpt.sgml delete mode 100644 ghc/docs/libraries/GlaExts.sgml delete mode 100644 ghc/docs/libraries/IOExts.sgml delete mode 100644 ghc/docs/libraries/Int.sgml delete mode 100644 ghc/docs/libraries/Makefile delete mode 100644 ghc/docs/libraries/NumExts.sgml delete mode 100644 ghc/docs/libraries/Pretty.sgml delete mode 100644 ghc/docs/libraries/ST.sgml delete mode 100644 ghc/docs/libraries/Stable.sgml delete mode 100644 ghc/docs/libraries/Weak.sgml delete mode 100644 ghc/docs/libraries/Word.sgml delete mode 100644 ghc/docs/libraries/libs.sgml delete mode 100644 ghc/docs/libraries/refs.bib diff --git a/ghc/docs/libraries/Addr.sgml b/ghc/docs/libraries/Addr.sgml deleted file mode 100644 index 39c62da..0000000 --- a/ghc/docs/libraries/Addr.sgml +++ /dev/null @@ -1,68 +0,0 @@ - -

- -This library provides machine addresses and is primarily intended for -use in creating foreign function interfaces using GreenCard. - - -module Addr where -data Addr -- Address type -instance Eq Addr -instance Ord Addr - -nullAddr :: Addr -plusAddr :: Addr -> Int -> Addr - --- read value out of _immutable_ memory -indexCharOffAddr :: Addr -> Int -> Char -indexIntOffAddr :: Addr -> Int -> Int -indexAddrOffAddr :: Addr -> Int -> Addr -indexFloatOffAddr :: Addr -> Int -> Float -indexDoubleOffAddr :: Addr -> Int -> Double -indexWord8OffAddr :: Addr -> Int -> Word8 -indexWord16OffAddr :: Addr -> Int -> Word16 -indexWord32OffAddr :: Addr -> Int -> Word32 -indexWord64OffAddr :: Addr -> Int -> Word64 -indexInt8OffAddr :: Addr -> Int -> Int8 -indexInt16OffAddr :: Addr -> Int -> Int16 -indexInt32OffAddr :: Addr -> Int -> Int32 -indexInt64OffAddr :: Addr -> Int -> Int64 - --- read value out of mutable memory -readCharOffAddr :: Addr -> Int -> IO Char -readIntOffAddr :: Addr -> Int -> IO Int -readAddrOffAddr :: Addr -> Int -> IO Addr -readFloatOffAddr :: Addr -> Int -> IO Float -readDoubleOffAddr :: Addr -> Int -> IO Double -readWord8OffAddr :: Addr -> Int -> IO Word8 -readWord16OffAddr :: Addr -> Int -> IO Word16 -readWord32OffAddr :: Addr -> Int -> IO Word32 -readWord64OffAddr :: Addr -> Int -> IO Word64 -readInt8OffAddr :: Addr -> Int -> IO Int8 -readInt16OffAddr :: Addr -> Int -> IO Int16 -readInt32OffAddr :: Addr -> Int -> IO Int32 -readInt64OffAddr :: Addr -> Int -> IO Int64 - --- write value into mutable memory -writeCharOffAddr :: Addr -> Int -> Char -> IO () -writeIntOffAddr :: Addr -> Int -> Int -> IO () -writeAddrOffAddr :: Addr -> Int -> Addr -> IO () -writeForeignObjOffAddr :: Addr -> Int -> ForeignObj -> IO () -writeFloatOffAddr :: Addr -> Int -> Float -> IO () -writeDoubleOffAddr :: Addr -> Int -> Double -> IO () -writeWord8OffAddr :: Addr -> Int -> Word8 -> IO () -writeWord16OffAddr :: Addr -> Int -> Word16 -> IO () -writeWord32OffAddr :: Addr -> Int -> Word32 -> IO () -writeWord64OffAddr :: Addr -> Int -> Word64 -> IO () -writeInt8OffAddr :: Addr -> Int -> Int8 -> IO () -writeInt16OffAddr :: Addr -> Int -> Int16 -> IO () -writeInt32OffAddr :: Addr -> Int -> Int32 -> IO () -writeInt64OffAddr :: Addr -> Int -> Int64 -> IO () - - -Hugs provides -

- -This library defines bitwise operations for signed and unsigned ints. - - -module Bits where -infixl 8 `shift`, `rotate` -infixl 7 .&. -infixl 6 `xor` -infixl 5 .|. - -class Bits a where - (.&.), (.|.), xor :: a -> a -> a - complement :: a -> a - shift :: a -> Int -> a - rotate :: a -> Int -> a - bit :: Int -> a - setBit :: a -> Int -> a - clearBit :: a -> Int -> a - complementBit :: a -> Int -> a - testBit :: a -> Int -> Bool - bitSize :: a -> Int - isSigned :: a -> Bool - -shiftL, shiftR :: Bits a => a -> Int -> a -rotateL, rotateR :: Bits a => a -> Int -> a -shiftL a i = shift a i -shiftR a i = shift a (-i) -rotateL a i = rotate a i -rotateR a i = rotate a (-i) - - -Notes: - - - - - Bits are numbered from 0 with bit 0 being the least significant bit. - - - - - diff --git a/ghc/docs/libraries/Concurrent.sgml b/ghc/docs/libraries/Concurrent.sgml deleted file mode 100644 index e02a515..0000000 --- a/ghc/docs/libraries/Concurrent.sgml +++ /dev/null @@ -1,415 +0,0 @@ - -

- - -

- -GHC and Hugs both provide concurrency extensions, as described in -. - -Concurrency in GHC and Hugs is "lightweight", which means that both -thread creation and context switching overheads are extremely low. -Scheduling of Haskell threads is done internally in the Haskell -runtime system, and doesn't make use of any operating system-supplied -thread packages. - -Haskell threads can communicate via -

- -To gain access to the concurrency primitives, just -forkIO :: IO () -> IO ThreadId - - -This sparks off a new thread to run the -killThread :: ThreadId -> IO () - - -this terminates the given thread (Note: ) may be raised in any thread for -which we have a -raiseInThread :: ThreadId -> Exception -> IO () - - -Actually -myThreadId :: IO ThreadId - - -NOTE: if you have a Scheduling -

- -GHC uses preemptive multitasking: context switches can occur -at any time. At present, Hugs uses cooperative multitasking: -context switches only occur when you use one of the primitives defined -in this module. This means that programs such as: - - -main = forkIO (write 'a') >> write 'b' - where write c = putChar c >> write c - - -will print either yield action forces a context-switch to any other -currently runnable threads (if any), and is occasionally useful when -implementing concurrency abstractions: - - -yield :: IO () - - - - -Finally, there are operations to delay a concurrent thread, and to -make one wait:delay a concurrent thread -wait for a file descriptor - - -threadDelay :: Int -> IO () -- delay rescheduling for N microseconds -threadWaitRead :: Int -> IO () -- wait for input on specified file descriptor -threadWaitWrite :: Int -> IO () -- (read and write, respectively). - - -The -Calling a foreign C procedure (such as all threads, in both -GHC and Hugs. The GHC I/O system uses non-blocking I/O internally to implement -thread-friendly I/O, so calling standard Haskell I/O functions blocks -only the thead making the call. - - - -

- - -

- -The synchronising variables. - -synchronising variables (Glasgow extension) -concurrency -- synchronising variables - -MVars (Glasgow extension) are rendezvous points, -mostly for concurrent threads. They begin either empty or full, and -any attempt to read an empty -data MVar a -- abstract -instance Eq (MVar a) - -newEmptyMVar :: IO (MVar a) -newMVar :: a -> IO (MVar a) -takeMVar :: MVar a -> IO a -putMVar :: MVar a -> a -> IO () -readMVar :: MVar a -> IO a -swapMVar :: MVar a -> a -> IO a -isEmptyMVar :: MVar a -> IO Bool - - -The operation -

- -A channel variable ( -data CVar a -newCVar :: IO (CVar a) -putCVar :: CVar a -> a -> IO () -getCVar :: CVar a -> IO a - - - -

- -A -data Chan a -newChan :: IO (Chan a) -putChan :: Chan a -> a -> IO () -getChan :: Chan a -> IO a -dupChan :: Chan a -> IO (Chan a) -unGetChan :: Chan a -> a -> IO () -getChanContents :: Chan a -> IO [a] - - - -

- -General and quantity semaphores: - - -data QSem -newQSem :: Int -> IO QSem -waitQSem :: QSem -> IO () -signalQSem :: QSem -> IO () - -data QSemN -newQSemN :: Int -> IO QSemN -signalQSemN :: QSemN -> Int -> IO () -waitQSemN :: QSemN -> Int -> IO () - - - -

- -Merging streams---binary and n-ary: - - -mergeIO :: [a] -> [a] -> IO [a] -nmergeIO :: [[a]] -> IO [a] - - -These actions fork one thread for each input list that concurrently -evaluates that list; the results are merged into a single output list. - -Note: Hugs does not provide the functions -

- -A Sample variable ( - Reading an empty Reading a filled Writing to an empty Writing to a filled - - -type SampleVar a = MVar (Int, MVar a) - -emptySampleVar :: SampleVar a -> IO () -newSampleVar :: IO (SampleVar a) -readSample :: SampleVar a -> IO a -writeSample :: SampleVar a -> a -> IO () - - - The - -The full interface for the -module Concurrent where - -data ThreadId -- thread identifiers -instance Eq ThreadId -instance Ord ThreadId - -forkIO :: IO () -> IO ThreadId -myThreadId :: IO ThreadId -killThread :: ThreadId -> IO () -yield :: IO () - -data MVar a -- Synchronisation variables -instance Eq (MVar a) -newEmptyMVar :: IO (MVar a) -newMVar :: a -> IO (MVar a) -takeMVar :: MVar a -> IO a -putMVar :: MVar a -> a -> IO () -swapMVar :: MVar a -> a -> IO a -readMVar :: MVar a -> IO a -isEmptyMVar :: MVar a -> IO Bool - - -data Chan a -- channels -newChan :: IO (Chan a) -writeChan :: Chan a -> a -> IO () -readChan :: Chan a -> IO a -dupChan :: Chan a -> IO (Chan a) -unReadChan :: Chan a -> a -> IO () -isEmptyChan :: Chan a -> IO Bool -getChanContents :: Chan a -> IO [a] -writeList2Chan :: Chan a -> [a] -> IO () - -data CVar a -- one element channels -newCVar :: IO (CVar a) -putCVar :: CVar a -> a -> IO () -getCVar :: CVar a -> IO a - -data QSem -- General/quantity semaphores -newQSem :: Int -> IO QSem -waitQSem :: QSem -> IO () -signalQSem :: QSem -> IO () - -data QSemN -- General/quantity semaphores -newQSemN :: Int -> IO QSemN -waitQSemN :: QSemN -> Int -> IO () -signalQSemN :: QSemN -> Int -> IO () - -type SampleVar a -- Sample variables -newEmptySampleVar:: IO (SampleVar a) -newSampleVar :: a -> IO (SampleVar a) -emptySampleVar :: SampleVar a -> IO () -readSampleVar :: SampleVar a -> IO a -writeSampleVar :: SampleVar a -> a -> IO () - -threadDelay :: Int -> IO () -threadWaitRead :: Int -> IO () -threadWaitWrite :: Int -> IO () - - - GHC-specific concurrency issues -

- -In a standalone GHC program, only the main thread is required to -terminate in order for the process to terminate. Thus all other -forked threads will simply terminate at the same time as the main -thread (the terminology for this kind of behaviour is ``daemonic -threads''). - -If you want the program to wait for child threads to finish before -exiting, you need to program this yourself. A simple mechanism is to -have each child thread write to an -myForkIO :: IO () -> IO (MVar ()) -myForkIO io = do - mvar <- newEmptyMVar - forkIO (io `finally` putMVar mvar ()) - return mvar - - -Note that we use -children :: MVar [MVar ()] -children = unsafePerformIO (newMVar []) - -waitForChildren :: IO () -waitForChildren = do - (mvar:mvars) <- takeMVar children - putMVar children mvars - takeMVar mvar - waitForChildren - -forkChild :: IO () -> IO () -forkChild io = do - mvar <- newEmptyMVar - forkIO (p `finally` putMVar mvar ()) - childs <- takeMVar children - putMVar children (mvar:childs) - -later = flip finally - -main = - later waitForChildren $ - ... - diff --git a/ghc/docs/libraries/Dynamic.sgml b/ghc/docs/libraries/Dynamic.sgml deleted file mode 100644 index eccaddb..0000000 --- a/ghc/docs/libraries/Dynamic.sgml +++ /dev/null @@ -1,162 +0,0 @@ - -

- -The -data Dynamic -- abstract, instance of: Show -- - -toDyn :: Typeable a => a -> Dynamic -fromDyn :: Typeable a => Dynamic -> a -> a -fromDynamic :: Typeable a => Dynamic -> Maybe a - - - - There's two ways of going from a dynamic value to one with -a concrete type: -The - - -

- -Haskell types are represented as terms using the -data TypeRep -- abstract, instance of: Eq, Show -data TyCon -- abstract, instance of: Eq, Show - -mkTyCon :: String -> TyCon -mkAppTy :: TyCon -> [TypeRep] -> TypeRep -mkFunTy :: TypeRep -> TypeRep -> TypeRep -applyTy :: TypeRep -> TypeRep -> Maybe TypeRep - - - - Type constructors are represented by the abstract type, - -Most importantly, -To allow comparisons between -mkTyCon :: String -> TyCon - - -An implementation of the - mkTyCon "a" == mkTyCon "a" - - -A really efficient implementation is possible if we guarantee/demand -that the strings are unique, and for a particular type constructor, -the application Would this constraint be -unworkable in practice? - -Both - -The Typeable class -Typeable class -

- -To ease the construction of -class Typeable a where - typeOf :: a -> TypeRep - - - - The The -Prelude types: - Int, Char, Bool, Float, Double, Integer, (IO a), - [a], (Either a b), (Maybe a), (a->b), - (), (,), (,,), (,,,), (,,,,), - Ordering, Complex, Array, Handle -Hugs/GHC types: - Addr, Word8, Word16, Word32, Word64, - Int8,Int16,Int32,Int64, - ForeignObj, MVar, (ST s a), (StablePtr a) -GHC types: - Word, ByteArray, MutableByteArray - - - - - -

- -Operations for applying a dynamic function type to a -dynamically typed argument are commonly useful, and -also provided: - - -dynApply :: Dynamic -> Dynamic -> Dynamic -- unsafe. -dynApplyMb :: Dynamic -> Dynamic -> Maybe Dynamic - diff --git a/ghc/docs/libraries/Exception.sgml b/ghc/docs/libraries/Exception.sgml deleted file mode 100644 index 55de61d..0000000 --- a/ghc/docs/libraries/Exception.sgml +++ /dev/null @@ -1,206 +0,0 @@ - -

- -The Exception library provides an interface for raising and catching -both built-in and user defined exceptions. - -Exceptions are defined by the following (non-abstract) datatype: - - -data Exception - = IOException IOError -- IO exceptions (from 'fail') - | ArithException ArithException -- Arithmetic exceptions - | ErrorCall String -- Calls to 'error' - | NoMethodError String -- A non-existent method was invoked - | PatternMatchFail String -- A pattern match failed - | NonExhaustiveGuards String -- A guard match failed - | RecSelError String -- Selecting a non-existent field - | RecConError String -- Field missing in record construction - | RecUpdError String -- Record doesn't contain updated field - | AssertionFailed String -- Assertions - | DynException Dynamic -- Dynamic exceptions - | AsyncException AsyncException -- Externally generated errors - -instance Eq Exception -instance Ord Exception -instance Show Exception - -data ArithException - = Overflow - | Underflow - | LossOfPrecision - | DivideByZero - | Denormal - -instance Eq ArithError -instance Ord ArithError -instance Show ArithError - -data AsyncException - = StackOverflow - | HeapOverflow - | ThreadKilled - deriving (Eq, Ord) - -instance Eq AsyncException -instance Ord AsyncException -instance Show AsyncException - - -An implementation should raise the appropriate exception when one of -the above conditions arises. Note: GHC currently doesn't generate -the arithmetic or the async exceptions. - -Exceptions may be thrown explicitly from anywhere: - - -throw :: Exception -> a - - - The - -There are several functions for catching and examining exceptions; all -of them may only be used from within the -tryAll :: a -> IO (Either Exception a) -tryAllIO :: IO a -> IO (Either Exception a) -try :: (Exception -> Maybe b) -> a -> IO (Either b a) -tryIO :: (Exception -> Maybe b) -> IO a -> IO (Either b a) - - -The simplest version is -justIoErrors :: Exception -> Maybe IOError -justArithExceptions :: Exception -> Maybe ArithException -justErrors :: Exception -> Maybe String -justDynExceptions :: Exception -> Maybe Dynamic -justAssertions :: Exception -> Maybe String -justAsyncExceptions :: Exception -> Maybe AsyncException - - -For example, to catch just calls to 'error' we could use something -like - - - result <- try justErrors thing_to_try - - -Any other exceptions which aren't matched by the predicate are -re-raised, and may be caught by an enclosing The - -The -catchAll :: a -> (Exception -> IO a) -> IO a -catchAllIO :: IO a -> (Exception -> IO a) -> IO a -catch :: (Exception -> Maybe b) -> a -> (b -> IO a) -> IO a -catchIO :: (Exception -> Maybe b) -> IO a -> (b -> IO a) -> IO a - - -The difference is that instead of returning an -

- -Because the ), which allows -exception values of any type in the -throwDyn :: Typeable exception => exception -> b -catchDyn :: Typeable exception => IO a -> (exception -> IO a) -> IO a - - -The Other Utilities -

- -The - bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c - bracket_ :: IO a -> IO b -> IO c -> IO c - finally :: IO a -> IO b -> IO b - - -For example, to open a file, do some work on it and then close it -again, we might use something like: - - -process_file = bracket (openFile "filename") closeFile - (do - ... - ) - - - -withFile name = bracket (openFile name) closeFile - - -The -

- -This module provides the ). - - -module Foreign where -data ForeignObj -- abstract, instance of: Eq - -makeForeignObj :: Addr{-object-} -> Addr{-finaliser-} -> IO ForeignObj -writeForeignObj :: ForeignObj -> Addr{-new value-} -> IO () -mkForeignObj :: Addr -> IO ForeignObj -addForeignFinalizer :: ForeignObj -> IO () -> IO () - - -In addition to the above, the following operations for indexing via -a -indexCharOffForeignObj :: ForeignObj -> Int -> Char -indexIntOffForeignObj :: ForeignObj -> Int -> Int -indexWordOffForeignObj :: ForeignObj -> Int -> Word -indexAddrOffForeignObj :: ForeignObj -> Int -> Addr -indexFloatOffForeignObj :: ForeignObj -> Int -> Float -indexDoubleOffForeignObj :: ForeignObj -> Int -> Double -indexWord8OffForeignObj :: ForeignObj -> Int -> Word8 -indexWord16OffForeignObj :: ForeignObj -> Int -> Word16 -indexWord32OffForeignObj :: ForeignObj -> Int -> Word32 -indexWord64OffForeignObj :: ForeignObj -> Int -> Word64 - -indexInt8OffForeignObj :: ForeignObj -> Int -> Int8 -indexInt16OffForeignObj :: ForeignObj -> Int -> Int16 -indexInt32OffForeignObj :: ForeignObj -> Int -> Int32 -indexInt64OffForeignObj :: ForeignObj -> Int -> Int64 - --- read value out of mutable memory -readCharOffForeignObj :: ForeignObj -> Int -> IO Char -readIntOffForeignObj :: ForeignObj -> Int -> IO Int -readWordOffForeignObj :: ForeignObj -> Int -> IO Word -readAddrOffForeignObj :: ForeignObj -> Int -> IO Addr -readFloatOffForeignObj :: ForeignObj -> Int -> IO Float -readDoubleOffForeignObj :: ForeignObj -> Int -> IO Double -readWord8OffForeignObj :: ForeignObj -> Int -> IO Word8 -readWord16OffForeignObj :: ForeignObj -> Int -> IO Word16 -readWord32OffForeignObj :: ForeignObj -> Int -> IO Word32 -readWord64OffForeignObj :: ForeignObj -> Int -> IO Word64 -readInt8OffForeignObj :: ForeignObj -> Int -> IO Int8 -readInt16OffForeignObj :: ForeignObj -> Int -> IO Int16 -readInt32OffForeignObj :: ForeignObj -> Int -> IO Int32 -readInt64OffForeignObj :: ForeignObj -> Int -> IO Int64 - -writeCharOffForeignObj :: ForeignObj -> Int -> Char -> IO () -writeIntOffForeignObj :: ForeignObj -> Int -> Int -> IO () -writeWordOffForeignObj :: ForeignObj -> Int -> Word -> IO () -writeAddrOffForeignObj :: ForeignObj -> Int -> Addr -> IO () -writeFloatOffForeignObj :: ForeignObj -> Int -> Float -> IO () -writeDoubleOffForeignObj :: ForeignObj -> Int -> Double -> IO () -writeWord8OffForeignObj :: ForeignObj -> Int -> Word8 -> IO () -writeWord16OffForeignObj :: ForeignObj -> Int -> Word16 -> IO () -writeWord32OffForeignObj :: ForeignObj -> Int -> Word32 -> IO () -writeWord64OffForeignObj :: ForeignObj -> Int -> Word64 -> IO () -writeInt8OffForeignObj :: ForeignObj -> Int -> Int8 -> IO () -writeInt16OffForeignObj :: ForeignObj -> Int -> Int16 -> IO () -writeInt32OffForeignObj :: ForeignObj -> Int -> Int32 -> IO () -writeInt64OffForeignObj :: ForeignObj -> Int -> Int64 -> IO () - - diff --git a/ghc/docs/libraries/GetOpt.sgml b/ghc/docs/libraries/GetOpt.sgml deleted file mode 100644 index 2aed0d8..0000000 --- a/ghc/docs/libraries/GetOpt.sgml +++ /dev/null @@ -1,96 +0,0 @@ - -

- -The -module GetOpt where - --- representing a single option: -data OptDescr a - = Option [Char] -- list of short option characters - [String] -- list of long option strings (without "--") - (ArgDescr a) -- argument descriptor - String -- explanation of option for user - --- argument option: -data ArgDescr a - = NoArg a -- no argument expected - | ReqArg (String -> a) String -- option requires argument - | OptArg (Maybe String -> a) String -- optional argument - -usageInfo :: String -- header - -> [OptDescr a] -- options recognised - -> String -- nicely formatted decription of options - -getOpt :: ArgOrder a -- non-option handling - -> [OptDescr a] -- options recognised - -> [String] -- the command-line - -> ( [a] -- options - , [String] -- non-options - ,[String] -- error messages - ) - -data ArgOrder a - = RequireOrder - | Permute - | ReturnInOrder (String -> a) - - - - - The command-line options recognised is described by a list of - -From a list of option values, -To decode a command-line with respect to a list of options, - - -To hopefully illuminate the role of the different -module Opts where - -import GetOpt -import Maybe ( fromMaybe ) - -data Flag - = Verbose | Version - | Input String | Output String | LibDir String - deriving Show - -options :: [OptDescr Flag] -options = - [ Option ['v'] ["verbose"] (NoArg Verbose) "chatty output on stderr" - , Option ['V','?'] ["version"] (NoArg Version) "show version number" - , Option ['o'] ["output"] (OptArg outp "FILE") "output FILE" - , Option ['c'] [] (OptArg inp "FILE") "input FILE" - , Option ['L'] ["libdir"] (ReqArg LibDir "DIR") "library directory" - ] - -inp,outp :: Maybe String -> Flag -outp = Output . fromMaybe "stdout" -inp = Input . fromMaybe "stdout" - -compilerOpts :: [String] -> IO ([Flag], [String]) -compilerOpts argv = - case (getOpt Permute options argv) of - (o,n,[] ) -> return (o,n) - (_,_,errs) -> fail (userError (concat errs ++ usageInfo header options)) - where header = "Usage: ic [OPTION...] files..." - - - diff --git a/ghc/docs/libraries/GlaExts.sgml b/ghc/docs/libraries/GlaExts.sgml deleted file mode 100644 index cdd2b7c..0000000 --- a/ghc/docs/libraries/GlaExts.sgml +++ /dev/null @@ -1,31 +0,0 @@ - diff --git a/ghc/docs/libraries/IOExts.sgml b/ghc/docs/libraries/IOExts.sgml deleted file mode 100644 index 6038706..0000000 --- a/ghc/docs/libraries/IOExts.sgml +++ /dev/null @@ -1,119 +0,0 @@ - -

- -(Documetation for this library is sadly inadequate.) - -This library provides the following extensions to the IO monad: - - -The operations . -

-Everyone knows that if the I/O computation wrapped in - test :: IORef [a] - test = unsafePerformIO $ newIORef [] - - main = do - writeIORef test [42] - bang <- readIORef test - print (bang :: [Char]) - -This program will core dump. This problem with polymorphic references is -well known in the ML community, and does not arise with normal monadic use -of references. There is no easy way to make it impossible once you use -coerce :: a -> b with the help of -References (aka mutable variables) and mutable arrays (but no form of -mutable byte arrays) - - - - -When called, - - - -> cache :: (a -> b) -> (a -> b) -> cache f = \x -> unsafePerformIO (check x) -> where -> ref = unsafePerformIO (newIORef (error "cache", error "cache")) -> check x = readIORef ref >>= \ (x',a) -> -> if x `unsafePtrEq` x' then -> return a -> else -> let a = f x in -> writeIORef ref (x, a) >> -> return a - - - - - -module IOExts where - -fixIO :: (a -> IO a) -> IO a -unsafePerformIO :: IO a -> a -unsafeInterleaveIO :: IO a -> IO a - -data IORef a -- mutable variables containing values of type a -newIORef :: a -> IO (IORef a) -readIORef :: IORef a -> IO a -writeIORef :: IORef a -> a -> IO () -instance Eq (IORef a) - -data IOArray ix elt -- mutable arrays indexed by values of type ix - -- containing values of type a. -newIOArray :: Ix ix => (ix,ix) -> elt -> IO (IOArray ix elt) -boundsIOArray :: Ix ix => IOArray ix elt -> (ix, ix) -readIOArray :: Ix ix => IOArray ix elt -> ix -> IO elt -writeIOArray :: Ix ix => IOArray ix elt -> ix -> elt -> IO () -freezeIOArray :: Ix ix => IOArray ix elt -> IO (Array ix elt) -instance Eq (IOArray ix elt) - -openFileEx :: FilePath -> IOModeEx -> IO Handle -data IOModeEx = BinaryMode IO.IOMode | TextMode IO.IOMode -instance Eq IOModeEx -instance Read IOModeEx -instance Show IOModeEx - -performGC :: IO () -trace :: String -> a -> a -unsafePtrEq :: a -> a -> Bool - - - diff --git a/ghc/docs/libraries/Int.sgml b/ghc/docs/libraries/Int.sgml deleted file mode 100644 index 574f555..0000000 --- a/ghc/docs/libraries/Int.sgml +++ /dev/null @@ -1,112 +0,0 @@ - -

- -This interface provides a collection of sized, signed integers. The -types supported are as follows: - - -type | number of bits @ - -Int8 | 8 @ -Int16 | 16 @ -Int32 | 32 @ -Int64 | 64 @ - - - -For each type -data I -- Signed Ints -iToInt :: I -> Int -- not provided for Int64 -intToI :: Int -> I -- not provided for Int64 -instance Eq I -instance Ord I -instance Show I -instance Read I -instance Bounded I -instance Num I -instance Real I -instance Integral I -instance Enum I -instance Ix I -instance Bits I - - -Plus the coercion functions - - -int8ToInt16 :: Int8 -> Int16 -int8ToInt32 :: Int8 -> Int32 -int8ToInt64 :: Int8 -> Int64 - -int16ToInt8 :: Int16 -> Int8 -int16ToInt32 :: Int16 -> Int32 -int16ToInt64 :: Int16 -> Int64 - -int32ToInt8 :: Int32 -> Int8 -int32ToInt16 :: Int32 -> Int16 -int32ToInt64 :: Int32 -> Int64 - -int64ToInt8 :: Int64 -> Int8 -int64ToInt16 :: Int64 -> Int16 -int64ToInt32 :: Int64 -> Int32 - -int8ToInt :: Int8 -> Int -int16ToInt :: Int16 -> Int -int32ToInt :: Int32 -> Int -int64ToInt :: Int64 -> Int - -intToInt8 :: Int -> Int8 -intToInt16 :: Int -> Int16 -intToInt32 :: Int -> Int32 -intToInt64 :: Int -> Int64 - -integerToInt8 :: Integer -> Int8 -integerToInt16 :: Integer -> Int16 -integerToInt32 :: Integer -> Int32 -integerToInt64 :: Integer -> Int64 - -int64ToInteger :: Int64 -> Integer -int32ToInteger :: Int32 -> Integer -int16ToInteger :: Int16 -> Integer -int8ToInteger :: Int8 -> Integer - - - - - -The rules that hold for -Right and left shifts by amounts greater than or equal to the width of -the type result in either zero or -1, depending on the sign of the -value being shifted. This is contrary to the behaviour in C, which is -undefined; a common interpretation is to truncate the shift count to -the width of the type, for example 1 << 32 == 1 in some -C implementations. - - -Hugs does not provide - -The -toInt :: (Integral a) => a -> Int -fromInt :: (Num a) => Int -> a - - -Portability note: both Hugs98 and all releases of GHC prior to -ghc-4.05 also exports these two via the Prelude. So, to have code -that uses toInt and fromInt be maximally portable, -make sure you add an import on Int (even if the version -of Hugs or GHC you're currently using may not export these two -from there.) - diff --git a/ghc/docs/libraries/Makefile b/ghc/docs/libraries/Makefile deleted file mode 100644 index 0705339..0000000 --- a/ghc/docs/libraries/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -#----------------------------------------------------------------------------- -# $Id: Makefile,v 1.2 1998/12/02 13:20:22 simonm Exp $ - -TOP=../.. -include $(TOP)/mk/boilerplate.mk - -SGML_DOC = libs - -include $(TOP)/mk/target.mk diff --git a/ghc/docs/libraries/NumExts.sgml b/ghc/docs/libraries/NumExts.sgml deleted file mode 100644 index 29ed938..0000000 --- a/ghc/docs/libraries/NumExts.sgml +++ /dev/null @@ -1,72 +0,0 @@ - -

- -The --- Going between Doubles and Floats: -doubleToFloat :: Double -> Float -floatToDouble :: Float -> Double - -showHex :: Integral a => a -> ShowS -showOct :: Integral a => a -> ShowS -showBin :: Integral a => a -> ShowS - -showIntAtBase :: Integral a - => a -- base - -> (a -> Char) -- digit to char - -> a -- number to show. - -> ShowS - -showListWith :: (a -> ShowS) -> [a] -> ShowS - - -Notes: - - - If - No loss of precision occurs in the other direction with - - - -showHex :: Integral a => a -> ShowS -showHex n r = - showString "0x" $ - showIntAtBase 16 (toChrHex) n r - where - toChrHex d - | d < 10 = chr (ord '0' + fromIntegral d) - | otherwise = chr (ord 'a' + fromIntegral (d - 10)) - - - - - putStrLn (NumExts.showListWith NumExts.showHex [0..16]) - - - will print out the elements of diff --git a/ghc/docs/libraries/Pretty.sgml b/ghc/docs/libraries/Pretty.sgml deleted file mode 100644 index aa71110..0000000 --- a/ghc/docs/libraries/Pretty.sgml +++ /dev/null @@ -1,59 +0,0 @@ - -

- -This library contains Simon Peyton Jones' implementation of John -Hughes's pretty printer combinators. - - -module Pretty where -infixl 6 <> -infixl 6 <+> -infixl 5 $$, $+$ -data Doc -- the Document datatype - --- The primitive Doc values -empty :: Doc -text :: String -> Doc -char :: Char -> Doc -int :: Int -> Doc -integer :: Integer -> Doc -float :: Float -> Doc -double :: Double -> Doc -rational :: Rational -> Doc -semi, comma, colon, space, equals :: Doc -lparen, rparen, lbrack, rbrack, lbrace, rbrace :: Doc -parens, brackets, braces :: Doc -> Doc -quotes, doubleQuotes :: Doc -> Doc - --- Combining Doc values -(<>) :: Doc -> Doc -> Doc -- Beside -hcat :: [Doc] -> Doc -- List version of <> -(<+>) :: Doc -> Doc -> Doc -- Beside, separated by space -hsep :: [Doc] -> Doc -- List version of <+> -($$) :: Doc -> Doc -> Doc -- Above; if there is no - -- overlap it "dovetails" the two -vcat :: [Doc] -> Doc -- List version of $$ -cat :: [Doc] -> Doc -- Either hcat or vcat -sep :: [Doc] -> Doc -- Either hsep or vcat -fcat :: [Doc] -> Doc -- ``Paragraph fill'' version of cat -fsep :: [Doc] -> Doc -- ``Paragraph fill'' version of sep -nest :: Int -> Doc -> Doc -- Nested -hang :: Doc -> Int -> Doc -> Doc -punctuate :: Doc -> [Doc] -> [Doc] --- punctuate p [d1, ... dn] = [d1 <> p, d2 <> p, ... dn-1 <> p, dn] - --- Displaying Doc values -instance Show Doc -render :: Doc -> String -- Uses default style -renderStyle :: Style -> Doc -> String -data Style = Style { lineLength :: Int, -- In chars - ribbonsPerLine :: Float, -- Ratio of ribbon length - -- to line length - mode :: Mode - } -data Mode = PageMode -- Normal - | ZigZagMode -- With zig-zag cuts - | LeftMode -- No indentation, infinitely long lines - | OneLineMode -- All on one line - diff --git a/ghc/docs/libraries/ST.sgml b/ghc/docs/libraries/ST.sgml deleted file mode 100644 index 3be2067..0000000 --- a/ghc/docs/libraries/ST.sgml +++ /dev/null @@ -1,82 +0,0 @@ - -

- -This library provides support for . In addition to the monad -module ST( module ST, module Monad ) where -import Monad - -data ST s a -- abstract type -runST :: forall a. (forall s. ST s a) -> a -fixST :: (a -> ST s a) -> ST s a -unsafeInterleaveST :: ST s a -> ST s a -instance Functor (ST s) -instance Monad (ST s) - -data STRef s a -- mutable variables in state thread s - -- containing values of type a. -newSTRef :: a -> ST s (STRef s a) -readSTRef :: STRef s a -> ST s a -writeSTRef :: STRef s a -> a -> ST s () -instance Eq (STRef s a) - -data STArray s ix elt -- mutable arrays in state thread s - -- indexed by values of type ix - -- containing values of type a. -newSTArray :: Ix ix => (ix,ix) -> elt -> ST s (STArray s ix elt) -boundsSTArray :: Ix ix => STArray s ix elt -> (ix, ix) -readSTArray :: Ix ix => STArray s ix elt -> ix -> ST s elt -writeSTArray :: Ix ix => STArray s ix elt -> ix -> elt -> ST s () -thawSTArray :: Ix ix => Array ix elt -> ST s (STArray s ix elt) -freezeSTArray :: Ix ix => STArray s ix elt -> ST s (Array ix elt) -unsafeFreezeSTArray :: Ix ix => STArray s ix elt -> ST s (Array ix elt) -instance Eq (STArray s ix elt) - -unsafeIOToST :: IO a -> ST s a -stToIO :: ST s a -> IO a - - -Notes: - - - -GHC also supports ByteArrays --- these aren't supported by Hugs yet. - - -The operations - Note that it is possible to install Hugs 1.4 without support for lazy - state threads, and hence the primitives described here may not be - available in all implementations. Also, in contrast with the - implementation of lazy state threads in previous releases of Hugs and - Gofer, there is no direct relationship between the - - - -Hugs provides - - -Operations for coercing an diff --git a/ghc/docs/libraries/Stable.sgml b/ghc/docs/libraries/Stable.sgml deleted file mode 100644 index 2d1dc36..0000000 --- a/ghc/docs/libraries/Stable.sgml +++ /dev/null @@ -1,126 +0,0 @@ - -

- -This module provides two kinds of stable references to Haskell -objects, stable names and stable pointers. - - -

- -A -data StablePtr a -- abstract, instance of: Eq. -makeStablePtr :: a -> IO (StablePtr a) -deRefStablePtr :: StablePtr a -> IO a -freeStablePtr :: StablePtr a -> IO () - - -Care must be taken to free stable pointers that are no longer required -using the - The object referenced by the stable pointer will be retained in -the heap. - The runtime system's internal stable pointer table will grow, -which imposes an overhead on garbage collection. - - -Notes: - - - If The reverse is not necessarily true: if two stable pointers are -not equal, it doesn't mean that they don't refer to the same Haskell -object (although they probably don't). Calling - - -The C interface (which is brought into scope by -typedef StablePtr /* abstract, probably an unsigned long */ -extern StgPtr deRefStablePtr(StgStablePtr stable_ptr); -static void freeStablePtr(StgStablePtr sp); -static StgStablePtr splitStablePtr(StgStablePtr sp); - - -The functions Stable Names -

- -A haskell object can be given a -data StableName a -- abstract, instance Eq. -makeStableName :: a -> IO (StableName a) -hashStableName :: StableName a -> Int - - -All these operations run in constant time. - -Stable names have the following properties: - - - If The reverse is not necessarily true: if two stable names are -not equal, it doesn't mean that they don't refer to the same Haskell -object (although they probably don't). - There is no There is no There is a - -Properties (1) and (2) are similar to stable pointers, but the key -differences are that you can't get back to the original object from a -stable name, and you can convert one to an -

- -The Module Signature -

- - -module Weak ( - Weak, -- abstract - -- instance Eq (Weak v) - - mkWeak, -- :: k -> v -> Maybe (IO ()) -> IO (Weak v) - deRefWeak, -- :: Weak v -> IO (Maybe v) - finalize, -- :: Weak v -> IO () - - -- Not yet implemented - -- replaceFinalizer -- :: Weak v -> IO () -> IO () - - mkWeakPtr, -- :: k -> Maybe (IO ()) -> IO (Weak k) - mkWeakPair, -- :: k -> v -> Maybe (IO ()) -> IO (Weak (k,v)) - addFinalizer, -- :: k -> IO () -> IO () - addForeignFinalizer -- :: ForeignObj -> IO () -> IO () - ) where - - -Weak pointers -

- -In general terms, a weak pointer is a reference to an object that is -not followed by the garbage collector --- that is, the existence of a -weak pointer to an object has no effect on the lifetime of that -object. A weak pointer can be de-referenced to find out -whether the object it refers to is still alive or not, and if so -to return the object itself. - -Weak pointers are particularly useful for caches and memo tables. -To build a memo table, you build a data structure -mapping from the function argument (the key) to its result (the -value). When you apply the function to a new argument you first -check whether the key/value pair is already in the memo table. -The key point is that the memo table itself should not keep the -key and value alive. So the table should contain a weak pointer -to the key, not an ordinary pointer. The pointer to the value must -not be weak, because the only reference to the value might indeed be -from the memo table. - -So it looks as if the memo table will keep all its values -alive for ever. One way to solve this is to purge the table -occasionally, by deleting entries whose keys have died. - -The weak pointers in this library -support another approach, called The simple interface -

- - - mkWeakPtr :: a -> Maybe (IO ()) -> IO (Weak a) - deRefWeak :: Weak a -> IO (Maybe a) - addFinalizer :: a -> IO () -> IO () - - - - addFinalizer :: a -> IO () -> IO () - addFinalizer v f = do { mkWeakPtr v f; return () } - - -The effect of - -Every finalizer will eventually be run, exactly once, either -soon after the object dies, or at the end of the program. -There is no requirement for the programmer to hold onto the -weak pointer itself; finalization is completely unaffected by -whether the weak pointer itself is alive. - -There may be multiple weak pointers to a single object. -In this case, the finalizers for each of these weak pointers will -all be run in some arbitrary order, or perhaps concurrently, -when the object dies. If the programmer specifies a finalizer that -assumes it has the only reference to an object -(for example, a file that it wishes to close), then the programmer -must ensure that there is only one such finalizer. - -The storage manager attempts to run the finalizer(s) for an -object soon after the object dies, but promptness is not guaranteed. -(What is guaranteed is that the finalizer will -eventually run, exactly once.) - -At the moment when a finalizer is run, a call to -A finalizer may contain a pointer to the object, but that pointer -will not keep the object alive. For example: - - f :: Show a => a -> IO a - f x = addFinalizer x (print (show x)) - -Here the finalizer -A finalizer may even resurrect the object, by (say) storing it in -some global data structure. - - -The general interface -

- -The - mkWeak :: k -> v -> Maybe (IO ()) -> IO (Weak v) - - - deRefWeak :: Weak a -> IO (Maybe a) - -However, - mkWeakPtr :: a -> Maybe (IO ()) -> IO (Weak a) - mkWeakPtr v f = mkWeak v v f - - -These more general weak pointers are enough to implement memo -tables properly. - -A weak pointer can be finalized early, using the -finalize :: Weak v -> IO () - - - A precise semantics -

-The above informal specification is fine for simple situations, -but matters can get complicated. In particular, it needs to -be clear exactly when a key dies, so that any weak pointers -that refer to it can be finalized. -Suppose, for example, the value of one weak pointer refers -to the key of another...does that keep the key alive? - -The behaviour is simply this: - - - If a weak pointer (object) refers to an Finalization means (a) arrange that subsequent calls -to - -This behaviour depends on what it means for a key to be reachable. -Informally, -something is reachable if it can be reached by following ordinary -pointers from the root set, but not following weak pointers. -We define reachability more precisely as -follows -A heap object is reachable if: - - - It is a member of the It is directly pointed to by a reachable object, other than -a weak pointer object. - It is a weak pointer object whose key is reachable. - It is the value or finalizer of an object whose key is -reachable. - - -The root set consists of all runnable threads, and all stable pointers -(see Section ). -NOTE: currently all top-level objects are considered to be reachable, -although we hope to remove this restriction in the future. A -Finalization for foreign objects -

- -A foreign object is some data that lives outside the Haskell heap, for -example some ), and we must retain the invariant that -). Historical note: -

- -This library provides unsigned integers of various sizes. -The types supported are as follows: - - - - - -type | number of bits @ -Word8 | 8 @ -Word16 | 16 @ -Word32 | 32 @ -Word64 | 64 @ - - - - -For each type -data W -- Unsigned Ints -instance Eq W -instance Ord W -instance Show W -instance Read W -instance Bounded W -instance Num W -instance Real W -instance Integral W -instance Enum W -instance Ix W -instance Bits W - -Plus - -word8ToWord16 :: Word8 -> Word16 -word8ToWord32 :: Word8 -> Word32 -word8ToWord64 :: Word8 -> Word64 - -word16ToWord8 :: Word16 -> Word8 -word16ToWord32 :: Word16 -> Word32 -word16ToWord64 :: Word16 -> Word64 - -word32ToWord8 :: Word32 -> Word8 -word32ToWord16 :: Word32 -> Word16 -word32ToWord64 :: Word32 -> Word64 - -word64ToWord8 :: Word64 -> Word8 -word64ToWord16 :: Word64 -> Word16 -word64ToWord32 :: Word64 -> Word32 - -word8ToInt :: Word8 -> Int -word16ToInt :: Word16 -> Int -word32ToInt :: Word32 -> Int -word64ToInt :: Word64 -> Int - -intToWord8 :: Int -> Word8 -intToWord16 :: Int -> Word16 -intToWord32 :: Int -> Word32 -intToWord64 :: Int -> Word64 - -word64ToInteger :: Word64 -> Integer -integerToWord64 :: Integer -> Word64 - - - -Notes: - - - All arithmetic is performed modulo 2^n - - One non-obvious consequence of this is that -The coercion -Use a -> b/ to -coerce between different sizes or to preserve sign when converting -between values of the same size. - - -It would be very natural to add a type a type -The rules that hold for -Right and left shifts by amounts greater than or equal to the width of -the type result in a zero result. This is contrary to the behaviour -in C, which is undefined; a common interpretation is to truncate -the shift count to the width of the type, for example 1 << -32 == 1 in some C implementations. - - - - - Hugs only provides diff --git a/ghc/docs/libraries/libs.sgml b/ghc/docs/libraries/libs.sgml deleted file mode 100644 index a8fcc7b..0000000 --- a/ghc/docs/libraries/libs.sgml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - -]> - - - -

- -The Hugs-GHC Extension Libraries -<author>The Hugs/GHC Team -<date>January 1999 -<abstract> -Hugs and GHC provide a common set of libraries to aid portability. -This document specifies the interfaces to these libraries and documents -known differences. -</abstract> - -<toc> - -<sect> <idx/Naming conventions/ -<label id="sec:Naming conventions"> -<p> - -The set of interfaces specified in this document try to adhere to the -following naming conventions: - -<itemize> -<item> -Actions that create a new values have the prefix <tt/new/ followed by -the name of the type of object they're creating, e.g., <tt/newIORef/, -<tt/newChan/ etc. -<item> -Operations that read a value from a mutable object are prefixed with -<tt/read/, and operations that update the contents have the prefix -<tt/write/, e.g., <tt/readChan/, <tt/readIOArray/. - -Notes: -<itemize> -<item> -This differs from the convention used to name the operations for -reading and writing to a file <tt/Handle/, where <tt/get/ and <tt/put/ -are used instead. -<item> -Operations provided by various concurrency abstractions, e.g., <tt/MVar/, -<tt/CVar/ , also deviate from this naming scheme. This is perhaps -defensible, since the read and write operations have additional -behaviour, e.g., <tt/takeMVar/ tries to read the current value -of an <tt/MVar/, locking it if it succeeds. -</itemize> -<item> -Conversions operators have the form <tt/AToB/ where <tt/A/ and <tt/B/ -are the types we're converting between. -<item> -Operations that lazily read values from a mutable object/handle, have -the form <tt/getXContents/, e.g., <tt/Channel.getChanContents/ and -<tt/IO.hGetContents/. (OK, so the latter isn't called -<tt/getHandleContents/, but you hopefully get the picture.) -</itemize> - -<!-- ========================= --> - -&addr -&bits -&concurrent -&dynamic -&exception -&foreign -&getopt -&glaexts -&ioexts -&int - -&numexts -&pretty -&st -&stable - -<sect> <idx/LazyST/ -<label id="sec:LazyST"> -<p> - -This library is identical to <tt/ST/ except that the <tt/ST/ monad -instance is <em/lazy/. The lazy ST monad tends to be more prone to -space leaks than the strict version, so most programmers will use the -former unless laziness is explicitly required. <tt/LazyST/ provides -two additional operations: - -<tscreen> <verb> -lazyToStrictST :: LazyST.ST s a -> ST.ST s a -strictToLazyST :: ST.ST s a -> LazyST.ST s a -</verb> </tscreen> - -These are used to convert between lazy and strict state threads. The -semantics with respect to laziness are as you would expect: the strict -state thread passed to <tt/strictToLazyST/ is not performed until the -result of the lazy state thread it returns is demanded. - -&weak -&word - -<!-- ========================= --> - -<biblio files="refs" style="abbrv"> - - -</article> - diff --git a/ghc/docs/libraries/refs.bib b/ghc/docs/libraries/refs.bib deleted file mode 100644 index 2a1d991..0000000 --- a/ghc/docs/libraries/refs.bib +++ /dev/null @@ -1,113 +0,0 @@ - -@article{Haskell1.2, - author = "Hudak, P. and Peyton Jones, S. and Wadler (editors), P.", - title = "Report on the {P}rogramming {L}anguage {H}askell, {A} {N}on-strict {P}urely {F}unctional {L}anguage ({V}ersion 1.2)", - journal = "ACM SIGPLAN Notices", - volume = "27", - number = "5", - month = "May", - year = "1992" -} - -@techreport{Haskell1.4, - author = "Peterson, J. and Hammond (editors), K.", - title = "Report on the {P}rogramming {L}anguage {H}askell 1.4, {A} {N}on-strict {P}urely {F}unctional {L}anguage", - institution = "Yale University", - address = "Department of Computer Science", - type = "Research Report", - number = "YALEU/DCS/RR-1106", - month = "April", - year = "1997" -} - -@techreport{Haskell1.4libs, - author = "Peterson, J. and Hammond (editors), K.", - title = "The {Haskell} library report version 1.4", - institution = "Yale University", - address = "Department of Computer Science", - type = "Research Report", - number = "YALEU/DCS/RR-1105", - month = "April", - year = "1997" -} - -@inproceedings{ImperativeFP, - author = "Peyton Jones, S. and Wadler, P.", - title = "Imperative Functional Programming", - booktitle = "Proceedings 20th Symposium on Principles of Programming Languages", - organization = "ACM", - month = "January", - year = "1993" -} - -@inproceedings{LazyStateThreads, - author = "Launchbury, J. and Peyton Jones, S.L.", - title = "Lazy functional state threads", - booktitle = "Conference on Programming Language Design and Implementation", - address = "Orlando, FL", - year = "1994", - month = "June" -} - -@book{BW, - author = "Bird, R. and Wadler, P.", - title = "Introduction to functional programming", - publisher = "Prentice Hall", - year = "1988" -} - -@article{GentleIntro, - author = "Hudak, P. and Fasel, J.", - title = "A gentle introduction to {Haskell}", - journal = "ACM SIGPLAN Notices", - volume = "27", - number = "5", - month = "May", - year = "1992", - note = "Also available as Research Report YALEU/DCS/RR-901, - Yale University, Department of Computer Science, April 1992." -} - -@techreport{Gofer, - author = "Jones, M.P.", - title = "The implementation of the {G}ofer functional programming system", - institution = "Yale University", - year = "1994", - month = "May", - address = "New Haven, Connecticut, USA", - type = "Research Report", - number = "YALEU/DCS/RR-1030", - note = "Available on the World-Wide Web from {\tt http://www.cs.nott.ac.uk/Department/Staff/mpj/pubs.html}" -} - -@unpublished{MonParse, - title = "Monadic parser combinators", - author = "Hutton, G. and Meijer, E.", - note = "Available from {\tt http://www.cs.nott.ac.uk/Department/Staff/gmh/bib.html}", - year = "1996" -} - -@inproceedings{concurrentHaskell:popl96, - author = "Simon {Peyton Jones} and Andrew Gordon and Sigbj\orn Finne", - title = "Concurrent {H}askell", - pages = "295--308", - booktitle = "Conference record of {POPL '96}: 23rd {ACM SIGPLAN-SIGACT} - {S}ymposium on {P}rinciples of {P}rogramming - {L}anguages", - publisher = "ACM press", - address = "St. Petersburg Beach, FL", - year = "1996", - month = "January" -} - -@inproceedings{Wadler:Essence, - author = "P. Wadler", - title = "The essence of functional programming (invited talk)", - booktitle = "Conference record of the Nineteenth annual {ACM} - {SIGPLAN-SIGACT} symposium on {P}rinciples of {P}rogramming - {L}anguages", - month = "Jan", - year = "1992", - pages = "1--14" -} - -- 1.7.10.4