summaryrefslogtreecommitdiff
path: root/ghc/lib/exts
Commit message (Collapse)AuthorAgeFilesLines
* [project @ 1999-11-26 16:29:09 by simonmar]simonmar1999-11-2622-8034/+0
| | | | GHC bits for new library organisation.
* [project @ 1999-11-25 12:21:19 by sewardj]sewardj1999-11-251-3/+1
| | | | import wibble for hugs
* [project @ 1999-11-11 21:13:12 by andy]andy1999-11-111-1/+6
| | | | | | | | | | | | | | | | This change provided by Alastair Reid is a bunch of wibbles which fix some severe performance problems in the copy of the Pretty library distributed with Hugs-Sept99. The problems show up when making heavy use of hsep (eg printing large numbers of comma separated lists which tend to run over the end of line). The problems manifest themselves as the infamous "control stack overflow" and seem to be due to the generation of large Int thunks that look something like this: 80 - 4 - 1 - 1 - 3 - 1 - ... -1 (There may be a few +'s in there too but -'s predominate.)
* [project @ 1999-11-10 23:26:57 by andy]andy1999-11-101-4/+399
| | | | | | | | Adding Int8,16,32,64 into Hugs. These changes are based on the current (Sep99 Hugs) version of Word. The GHC parts should be unchanged.
* [project @ 1999-11-04 00:32:30 by andy]andy1999-11-042-24/+42
| | | | Modifing these libs so that they also work with StgHugs.
* [project @ 1999-11-03 23:54:15 by andy]andy1999-11-031-5/+463
| | | | | | | | Adding Word8,16,32,64 into Hugs. These changes are based on the current (Sep99 Hugs) version of Word. The GHC parts should be unchanged.
* [project @ 1999-11-02 10:31:54 by simonpj]simonpj1999-11-021-1/+1
| | | | Fix bug in instance Dynamic (Either a b)
* [project @ 1999-10-29 13:55:40 by sof]sof1999-10-291-1/+5
| | | | attach version info
* [project @ 1999-10-25 05:19:22 by andy]andy1999-10-251-0/+493
| | | | | | | | | | | | | | | | | | | | Adding a axiomatic testing framework library to help test Hugs and GHC libraries. Here is the example for the test of concat. test_concat = testRules "concat" [ do (xss :: [[ALPHA]]) <- var "xss" concat xss <==> foldr (++) [] xss ] xss here ranges over various rendering of list of list, including bottom and lists containing bottom. <==> uses a small piece of compiler/interpreter specifics to allow testing for error "" ... <==> ... error "" ===> Pass
* [project @ 1999-10-10 18:38:52 by sof]sof1999-10-101-1/+57
| | | | | Added the {index,read,write}{PrimTy}OffForeignObj ops to Foreign's export list + upd. the docs on same a little.
* [project @ 1999-10-08 15:20:32 by sof]sof1999-10-081-17/+25
| | | | Incorporate some fixes for Hugs
* [project @ 1999-10-05 10:30:26 by simonmar]simonmar1999-10-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build System Cleanup -------------------- This commit is intended to clear the way for automatic RPM building. In particular, the idea is that 'make install' doesn't build anything, so you can do make install prefix=/some/tmp/prefix to install everything in /some/tmp/prefix, but leave the hardwired-in install directories the same. For scripts that depend on the install dir (currently just the GHC driver and mkdependHS), we now build two versions: <script>-inplace, which is used for running the script from the build tree, and <script>, which is the to-be-installed version. NOTE: binary distributions are now a little bit trickier to build. You *must* include the line "BIN_DIST=1" in your build.mk if you intend to make a binary distribution from the current build tree. This is because certain scripts have to be built differently, and we don't rebuild them when doing 'make binary-dist' anymore (since 'make binary-dist' just does a 'make install' with a re-targetted prefix, just like the RPM builder). Other changes - the binary-dist machinery is now all in fptools/Makefile - removed a gratuitous $(package)-$(version) level of directories from the binary distribution. - binary distributions are now placed under the package name, rather than fptools/fptools. - various other minor cleanups.
* [project @ 1999-10-05 09:02:30 by simonmar]simonmar1999-10-052-44/+44
| | | | | | Flatten out the tuple of bounds in the Array, MutableArray and ByteArray datatypes. This improves performance of heavy array manipulations quite significantly.
* [project @ 1999-09-21 14:28:14 by sof]sof1999-09-211-12/+17
| | | | Addr is now a _casm_ free zone + added indexStablePtrOffAddr
* [project @ 1999-09-21 09:46:04 by sof]sof1999-09-211-1/+7
| | | | v1.2 of Show Addr instance, pad out to fixed length
* [project @ 1999-09-21 08:59:46 by sof]sof1999-09-211-0/+12
| | | | | Moved Show instance for Addr from PrelAddr to Addr & made it display the Addr in hex (+ have it cope with ptrs with MSB set.)
* [project @ 1999-09-20 10:22:40 by sof]sof1999-09-201-3/+11
| | | | Added 'updateIORef :: IORef a -> (a->a) -> IO ()'
* [project @ 1999-09-19 19:30:26 by sof]sof1999-09-192-103/+142
| | | | exts/ is now also a _ccall_ free zone.
* [project @ 1999-09-19 19:30:04 by sof]sof1999-09-191-5/+53
| | | | | | | | | | | | | | | * Re-exported IO.HandlePosn, i.e., type HandlePosition = Integer data HandlePosn = HandlePosn Handle HandlePosition * Added hTell :: Handle -> HandlePosition (merely a wrapper for IO.hGetPosn ) * Added hSetBinaryMode :: Handle -> Bool -> IO Bool for dynamically changing the 'translation mode' of a Handle. This stuff is only useful on platforms that make a distinction between text and binary files (e.g., Win32)
* [project @ 1999-09-17 10:43:51 by sof]sof1999-09-171-1/+7
| | | | DLL building tweaks, including terrible hack to compile PrelMain
* [project @ 1999-09-12 15:02:43 by sof]sof1999-09-121-0/+3
| | | | | Export toInt and fromInt from Int as well as from the (now uncool) rag-bag that is GlaExts, since Hugs supports them too.
* [project @ 1999-09-11 18:30:49 by sof]sof1999-09-111-0/+55
| | | | | | | | | | | Experimental support for re-routeing I/O on a Handle to that of another for the duration of an IO action. Used to provide the following three (exported) actions withStdin, withStdout, withStderr :: Handle -> IO a -> IO a which 'replaces' one of the standard handles with that of the supplied handle while performing the second action.
* [project @ 1999-08-30 18:19:39 by simonpj]simonpj1999-08-303-0/+6
| | | | Adjust library imports to get fromInt/toInt from PrelNum
* [project @ 1999-08-06 12:09:30 by sof]sof1999-08-061-0/+908
| | | | Moved Pretty from misc/ to exts/
* [project @ 1999-07-27 11:12:05 by simonmar]simonmar1999-07-271-0/+7
| | | | | | | | | | add unofficial/undocumented function: mkWeakIORef :: IORef a -> IO () -> IO (Weak (IORef a)) for weak pointers to IORefs. This avoids some of the problems with inlining disturbing the semantics of mkWeak by making the weak key point to the primitive MutVar instead of the box.
* [project @ 1999-07-06 16:45:31 by simonpj]simonpj1999-07-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All Simon's recent tuning changes. Rough summary follows: * Fix Kevin Atkinson's cant-find-instance bug. Turns out that Rename.slurpSourceRefs needs to repeatedly call getImportedInstDecls, and then go back to slurping source-refs. Comments with Rename.slurpSourceRefs. * Add a case to Simplify.mkDupableAlt for the quite-common case where there's a very simple alternative, in which case there's no point in creating a join-point binding. * Fix CoreUtils.exprOkForSpeculation so that it returns True of (==# a# b#). This lack meant that case ==# a# b# of { True -> x; False -> x } was not simplifying * Make float-out dump bindings at the top of a function argument, as at the top of a let(rec) rhs. See notes with FloatOut.floatRhs * Make the ArgOf case of mkDupableAlt generate a OneShot lambda. This gave a noticeable boost to spectral/boyer2 * Reduce the number of coerces, using worker/wrapper stuff. The main idea is in WwLib.mkWWcoerce. The gloss is that we must do the w/w split even for small non-recursive things. See notes with WorkWrap.tryWw. * This further complicated getWorkerId, so I finally bit the bullet and make the workerInfo field of the IdInfo work properly, including under substitutions. Death to getWorkerId. Kevin Glynn will be happy. * Make all lambdas over realWorldStatePrimTy into one-shot lambdas. This is a GROSS HACK. * Also make the occurrence analyser aware of one-shot lambdas. * Make various Prelude things into INLINE, so that foldr doesn't get inlined in their body, so that the caller gets the benefit of fusion. Notably in PrelArr.lhs.
* [project @ 1999-05-18 14:59:04 by simonpj]simonpj1999-05-182-1/+5
| | | | ../compiler/msg_prel
* [project @ 1999-05-11 17:05:43 by keithw]keithw1999-05-111-2/+0
| | | | Remove some comments left in by mistake.
* [project @ 1999-05-11 16:47:39 by keithw]keithw1999-05-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | (this is number 9 of 9 commits to be applied together) Usage verification changes / ticky-ticky changes: We want to verify that SingleEntry thunks are indeed entered at most once. In order to do this, -ticky / -DTICKY_TICKY turns on eager blackholing. We blackhole with new blackholes: SE_BLACKHOLE and SE_CAF_BLACKHOLE. We will enter one of these if we attempt to enter a SingleEntry thunk twice. Note that CAFs are dealt with in by codeGen, and ordinary thunks by the RTS. We also want to see how many times we enter each Updatable thunk. To this end, we have modified -ticky. When -ticky is on, we update with a permanent indirection, and arrange that when we enter a permanent indirection we count the entry and then convert the indirection to a normal indirection. This gives us a means of counting the number of thunks entered again after the first entry. Obviously this screws up profiling, and so you can't build a ticky and profiling compiler any more. Also a few other changes that didn't make it into the previous 8 commits, but form a part of this set.
* [project @ 1999-05-05 10:48:03 by sof]sof1999-05-051-0/+12
| | | | DLL config added
* [project @ 1999-04-12 18:32:17 by sof]sof1999-04-121-0/+18
| | | | Added Haskell wrapper for freeHaskellFunctionPtr()
* [project @ 1999-03-27 16:15:22 by sof]sof1999-03-271-155/+133
| | | | | Generalised the {read,write}{Int,Word}{8,16,32,64}Array operations to ST, plus the arrays are indexed using Ix.
* [project @ 1999-03-26 19:43:43 by sof]sof1999-03-261-2/+6
| | | | re-export PrelGHC.assert
* [project @ 1999-03-16 13:20:07 by simonm]simonm1999-03-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improvements to the threading model. - asynchronous exceptions supported. - killThread# can now raise an exception in the specified thread. It's new type is killThread# :: ThreadId# -> Exception -> IO () High-level versions: killThread :: ThreadId -> IO () raiseInThread :: ThreadId -> Exception -> IO () (killThread raises a 'ThreadKilled' exception in the specified thread). If the thread has no exception handler, it is killed as before. Otherwise, the exception is passed to the innermost CATCH_FRAME and the thread is woken up if it was blocked. The current computation is suspended, instead of being replaced by the exception (as is the case with throw). Sending an exception to the current thread works too. - new primitive: myThreadId# :: IO ThreadId# and corresponding high-level version myThreadId :: IO ThreadId. - new primitive: yield# :: IO (), and yield :: IO (). - the TSO now contains a pointer to the resource currently blocked on (MVAR or BLACKHOLE_BQ). - Add a giant comment to TSO.h about what the various link fields are supposed to do, and invariants etc.
* [project @ 1999-03-05 10:21:22 by sof]sof1999-03-054-27/+87
| | | | | | | | | | | | | | | | | Support for unsafely thawing your (Byte)Arrays, i.e., added the following ops: MutableArray.unsafeThawArray :: Ix ix => Array ix elt -> ST s (MutableArray s ix elt) MutableArray.unsafeThawByteArray :: Ix ix => ByteArray ix -> ST s (MutableByteArray s ix) MutableArray.thawByteArray :: Ix ix => ByteArray ix -> ST s (MutableByteArray s ix) ST.unsafeThawSTArray :: Ix ix => Array ix elt -> ST s (STArray s ix elt) LazyST.unsafeThawSTArray :: Ix ix => Array ix elt -> ST s (STArray s ix elt) IOExts.unsafeFreezeIOArray :: Ix ix => IOArray ix elt -> IO (Array ix elt) IOExts.unsafeThawIOArray :: Ix ix => Array ix elt -> IO (IOArray ix elt) + removed the re-exportation of Monad that ST and LazyST did.
* [project @ 1999-03-02 20:10:17 by sof]sof1999-03-021-15/+15
| | | | StgNat* --> StgWord*
* [project @ 1999-03-01 08:38:36 by sof]sof1999-03-011-15/+20
| | | | | | | | | | Reinstate old signature for 'makeForeignObj', i.e. makeForeignObj :: Addr -> Addr -> IO ForeignObj combining the primitive 'makeForeignObj' and addForeignFinalizer(+). The primitive ForeignObj constructor is now exported as 'mkForeignObj'
* [project @ 1999-03-01 08:19:49 by sof]sof1999-03-011-0/+16
| | | | | | | | Added: writeStablePtrOffAddr :: Addr -> Int -> StablePtr a -> IO () readStablePtrOffAddr :: Addr -> Int -> IO (StablePtr a) writeForeignObjOffAddr :: Addr -> Int -> ForeignObj -> IO ()
* [project @ 1999-03-01 08:16:28 by sof]sof1999-03-011-1/+14
| | | | - added showListWith, non-overloaded version of showList.
* [project @ 1999-02-23 10:09:49 by simonm]simonm1999-02-231-7/+9
| | | | Integer fixes.
* [project @ 1999-02-22 11:47:17 by simonm]simonm1999-02-221-1/+5
| | | | Couple of Integer fixes.
* [project @ 1999-02-17 15:57:20 by simonm]simonm1999-02-173-24/+23
| | | | | | | | | | | | | | | | | | Fast Integers. The rep. of Integers is now data Integer = S# Int# | J# Int# ByteArray# - several new primops added for overflow-detecting arithmetic - negateInteger# removed; it can be done directly - integer_0, integer_1 etc. removed. - the compiler now uses S# where it previously used int2Integer. - the compiler generates small integers for -2^32 .. 2^32-1, instead of -2^29 .. -2^29-1. - PrelST.State datatype moved to LazyST (its only use). - some library code (in Time.lhs) still needs cleaning up, it depends on the Integer rep.
* [project @ 1999-02-11 14:35:23 by simonm]simonm1999-02-112-22/+17
| | | | More weak pointer changes.
* [project @ 1999-02-05 13:45:29 by sof]sof1999-02-051-2/+2
| | | | sigh, too hasty with dropping -monly-3-regs on Int and Word
* [project @ 1999-02-02 14:19:02 by simonm]simonm1999-02-021-4/+24
| | | | | - Add Weak.finalise - Move some functions from PrelWeak to Weak.
* [project @ 1999-02-02 13:26:31 by sof]sof1999-02-021-10/+5
| | | | - fixed Enum.fromEnumTo{Word32} to comply with H98 once again.
* [project @ 1999-02-02 13:24:52 by sof]sof1999-02-021-8/+9
| | | | | | | | - renamed boundsOfByteArray to boundsOfMutableByteArray. (partly for consistency, partly to create a new Top 10 entry on the list of long function names exported from lib/.) - moved sizeofByteArray over to ByteArray
* [project @ 1999-02-02 13:21:59 by sof]sof1999-02-021-2/+40
| | | | | | | | | | - Added: newByteArray :: Ix ix => (ix,ix) -> ST s (ByteArray ix) boundsOfByteArray :: Ix ix => ByteArray ix -> (ix,ix) sizeofByteArray :: Ix ix => ByteArray ix -> Int plus defined Eq over ByteArrays.
* [project @ 1999-02-01 18:05:30 by simonm]simonm1999-02-011-0/+1
| | | | | | - Add finalise# - Add mkWeakNoFinaliser - Move deRefWeak# from an out-of-line primop to an inline one.
* [project @ 1999-01-28 11:33:42 by simonpj]simonpj1999-01-281-2/+1
| | | | Remove unnecessary imports