[add haskell98 and flat-foreign directly to the repository
John Meacham <john@repetae.net>**20100722013712
 Ignore-this: b794f7120ed7745e585f490af5dc0c25
] adddir ./lib/haskell98
move ./lib/haskell98.cabal ./lib/haskell98/haskell98.cabal
adddir ./lib/flat-foreign
addfile ./lib/flat-foreign/Bits.hs
addfile ./lib/flat-foreign/CError.hs
addfile ./lib/flat-foreign/CForeign.hs
addfile ./lib/flat-foreign/CString.hs
addfile ./lib/flat-foreign/CTypes.hs
addfile ./lib/flat-foreign/ForeignPtr.hs
addfile ./lib/flat-foreign/Int.hs
addfile ./lib/flat-foreign/MarshalAlloc.hs
addfile ./lib/flat-foreign/MarshalArray.hs
addfile ./lib/flat-foreign/MarshalError.hs
addfile ./lib/flat-foreign/MarshalUtils.hs
addfile ./lib/flat-foreign/Ptr.hs
addfile ./lib/flat-foreign/StablePtr.hs
addfile ./lib/flat-foreign/Storable.hs
addfile ./lib/flat-foreign/Word.hs
addfile ./lib/flat-foreign/flat-foreign.cabal
addfile ./lib/haskell98/Array.hs
addfile ./lib/haskell98/CPUTime.hs
addfile ./lib/haskell98/Char.hs
addfile ./lib/haskell98/Complex.hs
addfile ./lib/haskell98/Directory.hs
addfile ./lib/haskell98/IO.hs
addfile ./lib/haskell98/Ix.hs
addfile ./lib/haskell98/LICENSE
addfile ./lib/haskell98/List.hs
addfile ./lib/haskell98/Locale.hs
addfile ./lib/haskell98/Maybe.hs
addfile ./lib/haskell98/Monad.hs
addfile ./lib/haskell98/Random.hs
addfile ./lib/haskell98/Ratio.hs
addfile ./lib/haskell98/System.hs
addfile ./lib/haskell98/Time.hs
addfile ./lib/haskell98/prologue.txt
hunk ./Makefile.am 57
-JHC_LIBS =  jhc-1.0.hl base-1.0.hl haskell98-1.0.hl applicative-1.0.hl
+JHC_LIBS =  jhc-1.0.hl base-1.0.hl haskell98-1.0.hl applicative-1.0.hl flat-foreign-1.0.hl
hunk ./Makefile.am 63
-             lib/jhc lib/base lib/haskell98 lib/haskell98.cabal $(JHC_LIBS) $(JHC_EXT_LIBS)   \
+             lib/jhc lib/base lib/haskell98 lib/flat-foreign $(JHC_LIBS) $(JHC_EXT_LIBS)  \
hunk ./Makefile.am 77
-darcs-fetch:
-	test -d lib/haskell98 || darcs get --partial http://darcs.haskell.org/packages/haskell98 --repodir=lib/haskell98
-
hunk ./Makefile.am 240
-haskell98-1.0.hl: lib/haskell98.cabal base-1.0.hl
+haskell98-1.0.hl: lib/haskell98/haskell98.cabal base-1.0.hl
hunk ./Makefile.am 243
+flat-foreign-1.0.hl: lib/flat-foreign/flat-foreign.cabal base-1.0.hl
+	./jhc $(LIB_OPTIONS) -ilib/flat-foreign -pjhc -pbase --build-hl $< -o $@
+
hunk ./docs/development.mkd 26
+    * darcs 2.0 or better
hunk ./docs/development.mkd 36
-First you must install darcs, there are a couple projects you need to pull in
-order to compile jhc, the following should produce a working tree:
+If the dependencies are installed properly, the following will produce a working tree:
hunk ./docs/development.mkd 42
-    make darcs-fetch
hunk ./lib/flat-foreign/Bits.hs 1
+module Bits (module Data.Bits) where
+import Data.Bits
+
hunk ./lib/flat-foreign/CError.hs 1
+module CError (module Foreign.C.Error) where
+import Foreign.C.Error
hunk ./lib/flat-foreign/CForeign.hs 1
+module CForeign ( module Foreign.C ) where
+import Foreign.C
hunk ./lib/flat-foreign/CString.hs 1
+module CString (module Foreign.C.String) where
+import Foreign.C.String
hunk ./lib/flat-foreign/CTypes.hs 1
+module CTypes (module Foreign.C.Types) where
+import Foreign.C.Types
hunk ./lib/flat-foreign/ForeignPtr.hs 1
+module ForeignPtr (module Foreign.ForeignPtr) where
+import Foreign.ForeignPtr
hunk ./lib/flat-foreign/Int.hs 1
+module Int ( module Data.Int ) where
+import Data.Int
hunk ./lib/flat-foreign/MarshalAlloc.hs 1
+module MarshalAlloc (module Foreign.Marshal.Alloc) where
+import Foreign.Marshal.Alloc
hunk ./lib/flat-foreign/MarshalArray.hs 1
+module MarshalArray (module Foreign.Marshal.Array) where
+import Foreign.Marshal.Array
hunk ./lib/flat-foreign/MarshalError.hs 1
+module MarshalError (
+  	module Foreign.Marshal.Error,
+	IOErrorType,
+	mkIOError,
+	alreadyExistsErrorType,
+	doesNotExistErrorType,
+	alreadyInUseErrorType,
+	fullErrorType,
+	eofErrorType,
+	illegalOperationErrorType,
+	permissionErrorType,
+	userErrorType,
+	annotateIOError
+  ) where
+
+import System.IO.Error
+import Foreign.Marshal.Error
hunk ./lib/flat-foreign/MarshalUtils.hs 1
+module MarshalUtils (module Foreign.Marshal.Utils) where
+import Foreign.Marshal.Utils
hunk ./lib/flat-foreign/Ptr.hs 1
+module Ptr (module Foreign.Ptr) where
+import Foreign.Ptr
hunk ./lib/flat-foreign/StablePtr.hs 1
+module StablePtr (module Foreign.StablePtr) where
+import Foreign.StablePtr
hunk ./lib/flat-foreign/Storable.hs 1
+module Storable (module Foreign.Storable) where
+import Foreign.Storable
hunk ./lib/flat-foreign/Word.hs 1
+module Word ( module Data.Word ) where
+import Data.Word
hunk ./lib/flat-foreign/flat-foreign.cabal 1
+name:		flat-foreign
+version:	1.0
+maintainer:	libraries@haskell.org
+synopsis:	Compatibility with non hierarchical FFI module names
+description:
+  This package provides compatibility with the flat module names originally
+  proposed for the FFI modules, since hierarchical modules were introduced
+  at the same time, use of these aliases is rare.
+homepage:	http://www.haskell.org/definition/
+build-depends:	base
+exposed-modules:
+        -- FFI addendum (Foreign is in the base package)
+        Bits, CError, CForeign, CString, CTypes, ForeignPtr, Int,
+        MarshalAlloc, MarshalArray, MarshalError, MarshalUtils, Ptr,
+        StablePtr, Storable, Word
hunk ./lib/haskell98/Array.hs 1
+module Array (
+    module Ix,  -- export all of Ix for convenience
+    Array, array, listArray, (!), bounds, indices, elems, assocs, 
+    accumArray, (//), accum, ixmap
+  ) where
+
+import Ix
+import Data.Array
hunk ./lib/haskell98/CPUTime.hs 1
+module CPUTime (
+    getCPUTime, cpuTimePrecision 
+  ) where
+
+import System.CPUTime
hunk ./lib/haskell98/Char.hs 1
+module Char (
+    isAscii, isLatin1, isControl, isPrint, isSpace, isUpper, isLower, 
+    isAlpha, isDigit, isOctDigit, isHexDigit, isAlphaNum, 
+    digitToInt, intToDigit,
+    toUpper, toLower,
+    ord, chr,
+    readLitChar, showLitChar, lexLitChar,
+
+-- ...and what the Prelude exports
+    Char, String
+  ) where
+
+import Data.Char
hunk ./lib/haskell98/Complex.hs 1
+module Complex (
+    Complex((:+)), realPart, imagPart, conjugate, 
+    mkPolar, cis, polar, magnitude, phase 
+  ) where
+
+import Data.Complex
hunk ./lib/haskell98/Directory.hs 1
+module Directory (
+    Permissions( Permissions, readable, writable, executable, searchable ), 
+    createDirectory, removeDirectory, removeFile, 
+    renameDirectory, renameFile, getDirectoryContents,
+    getCurrentDirectory, setCurrentDirectory,
+    doesFileExist, doesDirectoryExist,
+    getPermissions, setPermissions,
+    getModificationTime 
+  ) where
+
+import System.Directory
hunk ./lib/haskell98/IO.hs 1
+module IO (
+    Handle, HandlePosn,
+    IOMode(ReadMode,WriteMode,AppendMode,ReadWriteMode),
+    BufferMode(NoBuffering,LineBuffering,BlockBuffering),
+    SeekMode(AbsoluteSeek,RelativeSeek,SeekFromEnd),
+    stdin, stdout, stderr, 
+    openFile, hClose, hFileSize, hIsEOF, isEOF,
+    hSetBuffering, hGetBuffering, hFlush, 
+    hGetPosn, hSetPosn, hSeek, 
+    hWaitForInput, hReady, hGetChar, hGetLine, hLookAhead, hGetContents, 
+    hPutChar, hPutStr, hPutStrLn, hPrint,
+    hIsOpen, hIsClosed, hIsReadable, hIsWritable, hIsSeekable,
+    isAlreadyExistsError, isDoesNotExistError, isAlreadyInUseError, 
+    isFullError, isEOFError,
+    isIllegalOperation, isPermissionError, isUserError, 
+    ioeGetErrorString, ioeGetHandle, ioeGetFileName,
+    try, bracket, bracket_,
+
+    -- ...and what the Prelude exports
+    IO, FilePath, IOError, ioError, userError, catch, interact,
+    putChar, putStr, putStrLn, print, getChar, getLine, getContents,
+    readFile, writeFile, appendFile, readIO, readLn
+  ) where
+
+import System.IO
+import System.IO.Error
+
+-- | The 'bracket' function captures a common allocate, compute, deallocate
+-- idiom in which the deallocation step must occur even in the case of an
+-- error during computation. This is similar to try-catch-finally in Java.
+--
+-- This version handles only IO errors, as defined by Haskell 98.
+-- The version of @bracket@ in "Control.Exception" handles all exceptions,
+-- and should be used instead.
+
+bracket        :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c
+bracket before after m = do
+        x  <- before
+        rs <- try (m x)
+        _ <- after x
+        case rs of
+           Right r -> return r
+           Left  e -> ioError e
+
+-- | A variant of 'bracket' where the middle computation doesn't want @x@.
+--
+-- This version handles only IO errors, as defined by Haskell 98.
+-- The version of @bracket_@ in "Control.Exception" handles all exceptions,
+-- and should be used instead.
+
+bracket_        :: IO a -> (a -> IO b) -> IO c -> IO c
+bracket_ before after m = do
+         x  <- before
+         rs <- try m
+         _ <- after x
+         case rs of
+            Right r -> return r
+            Left  e -> ioError e
hunk ./lib/haskell98/Ix.hs 1
+module Ix (
+    Ix(range, index, inRange), rangeSize
+  ) where
+
+import Data.Ix
hunk ./lib/haskell98/LICENSE 1
+Code derived from the document "Report on the Programming Language
+Haskell 98", is distributed under the following license:
+
+  Copyright (c) 2002 Simon Peyton Jones
+
+  The authors intend this Report to belong to the entire Haskell
+  community, and so we grant permission to copy and distribute it for
+  any purpose, provided that it is reproduced in its entirety,
+  including this Notice.  Modified versions of this Report may also be
+  copied and distributed for any purpose, provided that the modified
+  version is clearly presented as such, and that it does not claim to
+  be a definition of the Haskell 98 Language.
+
+-----------------------------------------------------------------------------
+
+Code derived from the document "The Haskell 98 Foreign Function
+Interface, An Addendum to the Haskell 98 Report" is distributed under
+the following license:
+
+  Copyright (c) 2002 Manuel M. T. Chakravarty
+
+  The authors intend this Report to belong to the entire Haskell
+  community, and so we grant permission to copy and distribute it for
+  any purpose, provided that it is reproduced in its entirety,
+  including this Notice.  Modified versions of this Report may also be
+  copied and distributed for any purpose, provided that the modified
+  version is clearly presented as such, and that it does not claim to
+  be a definition of the Haskell 98 Foreign Function Interface.
+
+-----------------
+
+This code has been modified by John Meacham for distribution with jhc
hunk ./lib/haskell98/List.hs 1
+module List (
+    elemIndex, elemIndices,
+    find, findIndex, findIndices,
+    nub, nubBy, delete, deleteBy, (\\), deleteFirstsBy,
+    union, unionBy, intersect, intersectBy,
+    intersperse, transpose, partition, group, groupBy,
+    inits, tails, isPrefixOf, isSuffixOf,
+    mapAccumL, mapAccumR,
+    sort, sortBy, insert, insertBy, maximumBy, minimumBy,
+    genericLength, genericTake, genericDrop,
+    genericSplitAt, genericIndex, genericReplicate,
+    zip4, zip5, zip6, zip7,
+    zipWith4, zipWith5, zipWith6, zipWith7,
+    unzip4, unzip5, unzip6, unzip7, unfoldr,
+
+    -- ...and what the Prelude exports
+    -- []((:), []), -- This is built-in syntax
+    map, (++), concat, filter,
+    head, last, tail, init, null, length, (!!),
+    foldl, foldl1, scanl, scanl1, foldr, foldr1, scanr, scanr1,
+    iterate, repeat, replicate, cycle,
+    take, drop, splitAt, takeWhile, dropWhile, span, break,
+    lines, words, unlines, unwords, reverse, and, or,
+    any, all, elem, notElem, lookup,
+    sum, product, maximum, minimum, concatMap, 
+    zip, zip3, zipWith, zipWith3, unzip, unzip3
+  ) where
+
+import Data.List hiding (foldl')
hunk ./lib/haskell98/Locale.hs 1
+module Locale (
+    TimeLocale(..), defaultTimeLocale
+  ) where
+
+import System.Locale ( 
+	-- just the bits that are specified by Haskell 98
+	TimeLocale(TimeLocale,wDays,months,amPm,dateTimeFmt,
+		   dateFmt,timeFmt,time12Fmt),
+        defaultTimeLocale
+    )
hunk ./lib/haskell98/Maybe.hs 1
+module Maybe (
+    isJust, isNothing,
+    fromJust, fromMaybe, listToMaybe, maybeToList,
+    catMaybes, mapMaybe,
+
+    -- ...and what the Prelude exports
+    Maybe(Nothing, Just),
+    maybe
+  ) where
+
+import Data.Maybe
hunk ./lib/haskell98/Monad.hs 1
+module Monad (
+    MonadPlus(mzero, mplus),
+    join, guard, when, unless, ap,
+    msum,
+    filterM, mapAndUnzipM, zipWithM, zipWithM_, foldM, 
+    liftM, liftM2, liftM3, liftM4, liftM5,
+
+    -- ...and what the Prelude exports
+    Monad((>>=), (>>), return, fail),
+    Functor(fmap),
+    mapM, mapM_, sequence, sequence_, (=<<), 
+  ) where
+
+import Control.Monad
hunk ./lib/haskell98/Random.hs 1
+module Random (
+   RandomGen(next, split, genRange),
+   StdGen, mkStdGen,
+   Random( random,   randomR, randoms,  randomRs, randomIO, randomRIO ),
+   getStdRandom, getStdGen, setStdGen, newStdGen
+  ) where
+
+import System.Random
hunk ./lib/haskell98/Ratio.hs 1
+module Ratio (
+    Ratio, Rational, (%), numerator, denominator, approxRational
+  ) where
+
+import Data.Ratio
hunk ./lib/haskell98/System.hs 1
+module System (
+    ExitCode(ExitSuccess,ExitFailure),
+    getArgs, getProgName, getEnv, system, exitWith, exitFailure
+  ) where
+
+import System.Exit
+import System.Environment
+import System.Cmd
hunk ./lib/haskell98/Time.hs 1
+module Time (
+    ClockTime, 
+    Month(January,February,March,April,May,June,
+          July,August,September,October,November,December),
+    Day(Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday),
+    CalendarTime(CalendarTime, ctYear, ctMonth, ctDay, ctHour, ctMin,
+    		 ctSec, ctPicosec, ctWDay, ctYDay, ctTZName, ctTZ, ctIsDST),
+    TimeDiff(TimeDiff, tdYear, tdMonth, tdDay, tdHour,
+ 	     tdMin, tdSec, tdPicosec),
+    getClockTime, addToClockTime, diffClockTimes,
+    toCalendarTime, toUTCTime, toClockTime,
+    calendarTimeToString, formatCalendarTime 
+  ) where
+
+import System.Time
hunk ./lib/haskell98/haskell98.cabal 1
--- This is a modified version of the cabal file from ghc.
-
hunk ./lib/haskell98/haskell98.cabal 5
-maintainer:	libraries@haskell.org
hunk ./lib/haskell98/haskell98.cabal 6
-description:
-  This package provides compatibility with the modules of Haskell 98 by
-  means of wrappers around modules from the base package.  However Prelude and
-  Numeric are provided directly by the base package.
-
hunk ./lib/haskell98/haskell98.cabal 9
-	-- Haskell 98 (Prelude and Numeric are in the base package)
+	-- Haskell 98 (Prelude and Numeric are re-exported)
hunk ./lib/haskell98/prologue.txt 1
+This package provides compatibility with the modules of Haskell 98 and
+the FFI addendum, by means of wrappers around modules from the @base@ package
+(which in many cases have additional features).
+However @Prelude@, @Numeric@ and @Foreign@ are provided directly
+by the @base@ package.
+The modules of this package are documented in the /Revised Haskell 98 Report/,
+at <http://www.haskell.org/onlinereport/>,
+and the /Haskell 98 Foreign Function Interface/ addendum,
+at <http://www.cse.unsw.edu.au/~chak/haskell/ffi/>.