ghc-base.git
15 years agoGeneralise the type of onException
Ian Lynagh [Sun, 3 Aug 2008 00:30:01 +0000 (00:30 +0000)]
Generalise the type of onException
The type of the thing to do on an exception is now
    IO b
rather than
    IO ()
which better matches functions like bracket.

15 years agoRemove the dangerous Exception functions
Ian Lynagh [Sat, 2 Aug 2008 23:13:58 +0000 (23:13 +0000)]
Remove the dangerous Exception functions
Removed: catchAny, handleAny, ignoreExceptions
These make it easy to eat /any/ exception, which is rarely what you want.
Normally you either want to:
* only catch exceptions in a certain part of the hierarchy, e.g.
  "file not found", in which case you should only catch exceptions
  of the appropriate type,
or
* you want to do some cleanup when an exception happens, and then rethrow
  the exception, in which case you should use onException, or one of the
  bracketing functions.

15 years agoRemove an unused import
Ian Lynagh [Fri, 1 Aug 2008 23:03:43 +0000 (23:03 +0000)]
Remove an unused import

15 years agoRemove unused imports
Ian Lynagh [Fri, 1 Aug 2008 23:00:59 +0000 (23:00 +0000)]
Remove unused imports

15 years agoRemove unused imports in Control.Exception
Ian Lynagh [Fri, 1 Aug 2008 22:58:47 +0000 (22:58 +0000)]
Remove unused imports in Control.Exception

15 years agoGet rid of some duplicate imports
Ian Lynagh [Fri, 1 Aug 2008 21:49:33 +0000 (21:49 +0000)]
Get rid of some duplicate imports

15 years agoRemove the now-unused GHC/Conc.lhs-boot
Ian Lynagh [Fri, 1 Aug 2008 21:47:07 +0000 (21:47 +0000)]
Remove the now-unused GHC/Conc.lhs-boot

15 years agoMake some more imports non-recursive
Ian Lynagh [Fri, 1 Aug 2008 21:45:46 +0000 (21:45 +0000)]
Make some more imports non-recursive

15 years agoRejig some code so Control.Exception and GHC.Conc don't need recursive imports
Ian Lynagh [Fri, 1 Aug 2008 21:42:08 +0000 (21:42 +0000)]
Rejig some code so Control.Exception and GHC.Conc don't need recursive imports

15 years agoRemove the now-unused GHC/TopHandler.lhs-boot
Ian Lynagh [Fri, 1 Aug 2008 21:21:05 +0000 (21:21 +0000)]
Remove the now-unused GHC/TopHandler.lhs-boot

15 years agoReshuffle GHC.Conc/GHC.TopHandler a bit to remove a recursive import
Ian Lynagh [Fri, 1 Aug 2008 21:18:01 +0000 (21:18 +0000)]
Reshuffle GHC.Conc/GHC.TopHandler a bit to remove a recursive import

15 years agoDon't import Control.Concurrent.MVar in GHC.TopHandler
Ian Lynagh [Fri, 1 Aug 2008 20:01:23 +0000 (20:01 +0000)]
Don't import Control.Concurrent.MVar in GHC.TopHandler

15 years agoExport assertError from Control.Exception to make GHC happy
Ian Lynagh [Fri, 1 Aug 2008 11:17:16 +0000 (11:17 +0000)]
Export assertError from Control.Exception to make GHC happy
It's a wired-in name in GHC. We should possibly move it to another module.

15 years agoTopHandler now uses the new extensible exceptions
Ian Lynagh [Thu, 31 Jul 2008 15:35:53 +0000 (15:35 +0000)]
TopHandler now uses the new extensible exceptions

15 years agoComment wibble
Ian Lynagh [Wed, 30 Jul 2008 20:21:27 +0000 (20:21 +0000)]
Comment wibble

15 years agoMake numericEnumFrom more efficient
Ian Lynagh [Wed, 30 Jul 2008 20:20:49 +0000 (20:20 +0000)]
Make numericEnumFrom more efficient

15 years agoPut in some parens to clarify how things parse
Ian Lynagh [Wed, 30 Jul 2008 20:19:34 +0000 (20:19 +0000)]
Put in some parens to clarify how things parse

15 years agoapplied patches to make enumFrom and friends strict in arguments as per the Report...
Bart Massey [Sat, 26 Jul 2008 08:04:44 +0000 (08:04 +0000)]
applied patches to make enumFrom and friends strict in arguments as per the Report; closes ticket #1997

15 years agoDon't use "deriving Typeable" (for portability reasons)
Ian Lynagh [Wed, 30 Jul 2008 19:44:34 +0000 (19:44 +0000)]
Don't use "deriving Typeable" (for portability reasons)

15 years agoAdd onException
Ian Lynagh [Wed, 30 Jul 2008 17:20:14 +0000 (17:20 +0000)]
Add onException

15 years agoFix whitespace
Ian Lynagh [Wed, 30 Jul 2008 17:19:51 +0000 (17:19 +0000)]
Fix whitespace
The space after "\begin{code}" was confusing haddock

15 years agoRe-add blocked; it got lost in the extensible exceptions patches
Ian Lynagh [Wed, 30 Jul 2008 14:56:14 +0000 (14:56 +0000)]
Re-add blocked; it got lost in the extensible exceptions patches

15 years agoStart to actually use extensible exceptions
Ian Lynagh [Wed, 30 Jul 2008 14:51:15 +0000 (14:51 +0000)]
Start to actually use extensible exceptions

15 years agoRejig the extensible exceptions so there is less circular importing
Ian Lynagh [Wed, 30 Jul 2008 12:25:39 +0000 (12:25 +0000)]
Rejig the extensible exceptions so there is less circular importing

15 years agoDefine nonTermination for the RTS to use
Ian Lynagh [Sat, 21 Jun 2008 14:44:20 +0000 (14:44 +0000)]
Define nonTermination for the RTS to use
We'll probably need to do the same for some other exceptions too

15 years agoUse extensible exceptions at the lowest level
Ian Lynagh [Sat, 21 Jun 2008 12:15:01 +0000 (12:15 +0000)]
Use extensible exceptions at the lowest level
Everything above is largely unchanged; just the type of catch and throw.

15 years agoadd comment
Simon Marlow [Wed, 30 Jul 2008 11:45:59 +0000 (11:45 +0000)]
add comment

15 years agoadd some big warnings to the docs for unsafeIOToSTM (#2401)
Simon Marlow [Wed, 30 Jul 2008 11:45:54 +0000 (11:45 +0000)]
add some big warnings to the docs for unsafeIOToSTM (#2401)

15 years agoFIX #2376: inline shiftR
Simon Marlow [Wed, 30 Jul 2008 10:35:39 +0000 (10:35 +0000)]
FIX #2376: inline shiftR
Duplicating the default definition for shiftR doesn't seem quite right
to me, but it gets the right results when compiling the example
program, and I couldn't find a better way to do it.

15 years agoAdd instance Show Control.Exception.Exception for nhc98.
Malcolm.Wallace@cs.york.ac.uk [Mon, 28 Jul 2008 16:45:37 +0000 (16:45 +0000)]
Add instance Show Control.Exception.Exception for nhc98.

15 years agoExtend nhc98's Exception type to resemble ghc's more closely
Malcolm.Wallace@cs.york.ac.uk [Mon, 28 Jul 2008 16:34:45 +0000 (16:34 +0000)]
Extend nhc98's Exception type to resemble ghc's more closely

15 years agofix dummy async implementations for non-GHC
Ross Paterson [Tue, 15 Jul 2008 12:55:21 +0000 (12:55 +0000)]
fix dummy async implementations for non-GHC

15 years agoFix haddocking with older haddocks
Ian Lynagh [Thu, 10 Jul 2008 19:08:55 +0000 (19:08 +0000)]
Fix haddocking with older haddocks

15 years agoAdd threadStatus :: ThreadId -> IO ThreadStatus
Simon Marlow [Thu, 10 Jul 2008 15:17:11 +0000 (15:17 +0000)]
Add threadStatus :: ThreadId -> IO ThreadStatus

-- | The current status of a thread
data ThreadStatus
  = ThreadRunning
        -- ^the thread is currently runnable or running
  | ThreadFinished
        -- ^the thread has finished
  | ThreadBlocked  BlockReason
        -- ^the thread is blocked on some resource
  | ThreadDied
        -- ^the thread received an uncaught exception
  deriving (Eq,Ord,Show)

data BlockReason
  = BlockedOnMVar
        -- ^blocked on on 'MVar'
  | BlockedOnBlackHole
        -- ^blocked on a computation in progress by another thread
  | BlockedOnException
        -- ^blocked in 'throwTo'
  | BlockedOnSTM
        -- ^blocked in 'retry' in an STM transaction
  | BlockedOnForeignCall
        -- ^currently in a foreign call
  | BlockedOnOther
        -- ^blocked on some other resource.  Without @-threaded@,
        -- I/O and 'threadDelay' show up as 'BlockedOnOther', with @-threaded@
        -- they show up as 'BlockedOnMVar'.
  deriving (Eq,Ord,Show)

This is useful for concurrency debugging.  I've left threadStatus in
GHC.Conc for now, since the ThreadStatus type is somewhat GHC-specific.

15 years agoforkOS: start the new thread in blocked mode iff the parent was (#1048)
Simon Marlow [Wed, 9 Jul 2008 13:55:58 +0000 (13:55 +0000)]
forkOS: start the new thread in blocked mode iff the parent was (#1048)
This matches the behaviour of forkIO

15 years agoAdd Control.Exception.blocked :: IO Bool
Simon Marlow [Wed, 9 Jul 2008 13:31:39 +0000 (13:31 +0000)]
Add Control.Exception.blocked :: IO Bool
Tells you whether async exceptions are currently blocked or not.

15 years agoFIX BUILD (on Windows)
Simon Marlow [Wed, 9 Jul 2008 12:31:10 +0000 (12:31 +0000)]
FIX BUILD (on Windows)

15 years agocheck CONST_SIGINT
Simon Marlow [Wed, 9 Jul 2008 12:25:27 +0000 (12:25 +0000)]
check CONST_SIGINT

15 years agoMake threadWaitRead/threadWaitWrite partially useable on Windows
Simon Marlow [Wed, 9 Jul 2008 11:10:08 +0000 (11:10 +0000)]
Make threadWaitRead/threadWaitWrite partially useable on Windows

They work with -threaded by calling fdReady() in a separate thread.

"threadWaitRead 0" also works without -threaded (because we happen to
know it's virtually equivalent to "hWaitForInput stdin (-1)").

15 years agoFIX #1198: hWaitForInput on Windows
Simon Marlow [Tue, 8 Jul 2008 13:42:54 +0000 (13:42 +0000)]
FIX #1198: hWaitForInput on Windows
Now we do the appropriate magic in fdReady() to detect when there is
real input available, as opposed to uninteresting console events.

15 years agoFIX part of #2301
Simon Marlow [Wed, 9 Jul 2008 09:44:37 +0000 (09:44 +0000)]
FIX part of #2301

Control-C now causes the new exception (AsyncException UserInterrupt)
to be raised in the main thread.  The signal handler is set up by
GHC.TopHandler.runMainIO, and can be overriden in the usual way by
installing a new signal handler.  The advantage is that now all
programs will get a chance to clean up on ^C.

When UserInterrupt is caught by the topmost handler, we now exit the
program via kill(getpid(),SIGINT), which tells the parent process that
we exited as a result of ^C, so the parent can take appropriate action
(it might want to exit too, for example).

One subtlety is that we have to use a weak reference to the ThreadId
for the main thread, so that the signal handler doesn't prevent the
main thread from being subject to deadlock detection.

15 years ago() has moved to ghc-prim:GHC.Unit, and the Eq and Ord instances to Data.Tuple
Ian Lynagh [Tue, 24 Jun 2008 14:49:32 +0000 (14:49 +0000)]
() has moved to ghc-prim:GHC.Unit, and the Eq and Ord instances to Data.Tuple

15 years agoAdd GHC.Exts.maxTupleSize :: Int, the size of the largest tuple supported
Ian Lynagh [Sun, 22 Jun 2008 14:15:59 +0000 (14:15 +0000)]
Add GHC.Exts.maxTupleSize :: Int, the size of the largest tuple supported

15 years agoRemove code for older GHC versions
Ian Lynagh [Fri, 20 Jun 2008 19:45:21 +0000 (19:45 +0000)]
Remove code for older GHC versions

15 years agoMake the macros in Typeable.h add type signatures
Ian Lynagh [Thu, 19 Jun 2008 23:58:08 +0000 (23:58 +0000)]
Make the macros in Typeable.h add type signatures

15 years agoFix #2363: getChar cannot be interrupted with -threaded
Simon Marlow [Thu, 19 Jun 2008 14:19:11 +0000 (14:19 +0000)]
Fix #2363: getChar cannot be interrupted with -threaded
Now in -threaded mode, instead of just making a blocking call to
read(), we call select() first to make sure the read() won't block,
and if it would block, then we use threadWaitRead.

The idea is that the current thread must be interruptible while it
blocks.  This is a little slower than before, but the overhead only
applies to blocking Handles (stdin/stdout/stderr, and those created by
System.Process).

15 years agoRemove -fglasgow-exts from pragmas and comments
Ian Lynagh [Mon, 16 Jun 2008 23:07:27 +0000 (23:07 +0000)]
Remove -fglasgow-exts from pragmas and comments

15 years agoAvoid using deprecated flags
Ian Lynagh [Mon, 16 Jun 2008 14:52:07 +0000 (14:52 +0000)]
Avoid using deprecated flags

15 years agodelete __hscore_{mkstemp,getrlimit,setrlimit} (moved to unix)
Ross Paterson [Sun, 15 Jun 2008 22:44:13 +0000 (22:44 +0000)]
delete __hscore_{mkstemp,getrlimit,setrlimit} (moved to unix)

15 years agoUpdate WCsubst.c for Unicode 5.1.0, and add a README.Unicode
Ian Lynagh [Fri, 13 Jun 2008 20:17:54 +0000 (20:17 +0000)]
Update WCsubst.c for Unicode 5.1.0, and add a README.Unicode
README.Unicode describes how to do updates in the future.

15 years agoFix ubconfc
Ian Lynagh [Fri, 13 Jun 2008 20:14:56 +0000 (20:14 +0000)]
Fix ubconfc
The current code doesn't seem to be what was used to generate WCsubst.c,
so I'm not sure if it never worked, or if my tools work slightly
differently to those of the previous user.

16 years ago'permutations' is now more lazy and also faster
Twan van Laarhoven [Wed, 2 Jan 2008 23:17:12 +0000 (23:17 +0000)]
'permutations' is now more lazy and also faster

16 years ago'subsequences' is now more lazy and also faster
Twan van Laarhoven [Wed, 2 Jan 2008 23:16:29 +0000 (23:16 +0000)]
'subsequences' is now more lazy and also faster

16 years agoAdd 'subsequences' and 'permutations' to Data.List
Twan van Laarhoven [Tue, 18 Dec 2007 15:49:50 +0000 (15:49 +0000)]
Add 'subsequences' and 'permutations' to Data.List

15 years agoTweak the definition of (^) again
Ian Lynagh [Sun, 1 Jun 2008 12:07:59 +0000 (12:07 +0000)]
Tweak the definition of (^) again
This fixes trac #2306 (do the minimum number of (*)s), and also means
that we don't use the value of (1 :: a) which causes problems if the
Num a definition isn't complete.

15 years agonote about evaluation affecting StableNames
Simon Marlow [Tue, 27 May 2008 11:05:49 +0000 (11:05 +0000)]
note about evaluation affecting StableNames

15 years agoFix the build on Windows 2008-05-28
Ian Lynagh [Tue, 20 May 2008 21:36:43 +0000 (21:36 +0000)]
Fix the build on Windows

15 years agoAdd wrappers for [gs]etrlimit
Ian Lynagh [Tue, 20 May 2008 16:24:11 +0000 (16:24 +0000)]
Add wrappers for [gs]etrlimit
This is for #2038: macros are used in the Linux .h includes to redirect
to a 64-bit version when large file support is enabled.

15 years agoAdd a wrapper for mkstemp
Ian Lynagh [Tue, 20 May 2008 16:13:12 +0000 (16:13 +0000)]
Add a wrapper for mkstemp
This is for #2038: macros are used in the Linux .h includes to redirect
to a 64-bit version when large file support is enabled.

16 years agoAvoid calling varargs functions using the FFI
Simon Marlow [Fri, 9 May 2008 14:53:34 +0000 (14:53 +0000)]
Avoid calling varargs functions using the FFI
Calling varargs functions is explicitly deprecated according to the
FFI specification.  It used to work, just about, but it broke with the
recent changes to the via-C backend to not use header files.

16 years agoAdd comments about why rotate has an INLINE
simonpj@microsoft.com [Fri, 2 May 2008 07:41:37 +0000 (07:41 +0000)]
Add comments about why rotate has an INLINE

16 years agoInline Data.Bits.rotate@Int, enables rotate to be constant folded
Don Stewart [Thu, 1 May 2008 23:01:52 +0000 (23:01 +0000)]
Inline Data.Bits.rotate@Int, enables rotate to be constant folded

All other Bits instances seem to inline well enough on their own
to enable constant folding, e.g.

    sumU . mapU (`shift` 3) . replicateU 10000000 $ (7 :: Int)

goes to:

    Main.$wfold =
      \ (ww_sOb :: Int#) (ww1_sOf :: Int#) ->
        case ww1_sOf of wild_XM {
          __DEFAULT -> Main.$wfold (+# ww_sOb 56) (+# wild_XM 1);
          10000000 -> ww_sOb
        }

With this patch, rotate gets inlined and folded too,

    sumU . mapU (`rotate` 3) . replicateU 10000000 $ (7 :: Int)

to:

  Main.$wfold =
    \ (ww_sO7 :: Int#) (ww1_sOb :: Int#) ->
      case ww1_sOb of wild_XM {
        __DEFAULT -> Main.$wfold (+# ww_sO7 56) (+# wild_XM 1);
        10000000 -> ww_sO7

Whereas it was left as a call to $wrotate before.

16 years agoMoved def. of emptyP
keller@cse.unsw.edu.au [Thu, 1 May 2008 02:42:23 +0000 (02:42 +0000)]
Moved def. of emptyP

16 years agoemptyP def to gHC.PArr
keller@cse.unsw.edu.au [Thu, 1 May 2008 01:25:47 +0000 (01:25 +0000)]
emptyP def to gHC.PArr

16 years agoReexport (>>>) and (<<<) from Control.Arrow. Preserves API compatibility
Don Stewart [Wed, 30 Apr 2008 23:10:55 +0000 (23:10 +0000)]
Reexport (>>>) and (<<<) from Control.Arrow. Preserves API compatibility

16 years agoAdd realToFrac RULE comments from patch message into the source code
simonpj@microsoft.com [Wed, 30 Apr 2008 21:43:55 +0000 (21:43 +0000)]
Add realToFrac RULE comments from patch message into the source code

16 years agoAdd RULES for realToFrac from Int.
Don Stewart [Wed, 30 Apr 2008 17:41:26 +0000 (17:41 +0000)]
Add RULES for realToFrac from Int.

    {-# RULES
    "realToFrac/Int->Double"    realToFrac   = int2Double
    "realToFrac/Int->Float"     realToFrac   = int2Float
      #-}

Note that this only matters for realToFrac. If you've been using
fromIntegral to promote Int to Doubles, things should be fine as they are.

The following program, using stream fusion to eliminate arrays:

    import Data.Array.Vector

    n = 40000000

    main = do
          let c = replicateU n (2::Double)
              a = mapU realToFrac (enumFromToU 0 (n-1) ) :: UArr Double
          print (sumU (zipWithU (*) c a))

Yields this loop body without the RULE:

    case $wtoRational sc_sY4 of ww_aM7 { (# ww1_aM9, ww2_aMa #) ->
    case $wfromRat ww1_aM9 ww2_aMa of tpl_X1P { D# ipv_sW3 ->
    Main.$s$wfold
      (+# sc_sY4 1)
      (+# wild_X1i 1)
      (+## sc2_sY6 (*## 2.0 ipv_sW3))

And with the rule:

   Main.$s$wfold
      (+# sc_sXT 1)
      (+# wild_X1h 1)
      (+## sc2_sXV (*## 2.0 (int2Double# sc_sXT)))

The running time of the program goes from 120 seconds to 0.198 seconds
with the native backend, and 0.143 seconds with the C backend.

And just so I don't forget, here's the difference in resulting
assembly (x86_64), between the native code generator, and the
C backend.

-fasm

    Main_zdszdwfold_info:
      movq %rdi,%rax
      cmpq $40000000,%rax
      jne .LcZK
      jmp *(%rbp)
    .LcZK:
      cmpq $39999999,%rsi
      jg .LcZN
      cvtsi2sdq %rsi,%xmm0
      mulsd .LnZP(%rip),%xmm0
      movsd %xmm5,%xmm7
      addsd %xmm0,%xmm7
      incq %rax
      incq %rsi
      movq %rax,%rdi
      movsd %xmm7,%xmm5
      jmp Main_zdszdwfold_info

With the C backend we get the even better assembly, (-fvia-C -optc-O3)

    Main_zdszdwfold_info:
        cmpq    $40000000, %rdi
        je  .L9
    .L5:
        cmpq    $39999999, %rsi
        jg  .L9
        cvtsi2sdq   %rsi, %xmm0
        leaq    1(%rdi), %rdi
        addq    $1, %rsi
        addsd   %xmm0, %xmm0
        addsd   %xmm0, %xmm5
        jmp Main_zdszdwfold_info
    .L9:
        jmp *(%rbp)

So might make a useful test once the native codegen project starts up.

16 years agoJust (-0/1) is now printed as Just (-0.0), not Just -0.0; trac #2036
Ian Lynagh [Sun, 27 Apr 2008 13:32:30 +0000 (13:32 +0000)]
Just (-0/1) is now printed as Just (-0.0), not Just -0.0; trac #2036

16 years agorecord libraries@haskell.org as maintainer
Ross Paterson [Fri, 25 Apr 2008 09:52:00 +0000 (09:52 +0000)]
record libraries@haskell.org as maintainer

16 years agoAdded emptyP def
keller@cse.unsw.edu.au [Thu, 24 Apr 2008 02:14:03 +0000 (02:14 +0000)]
Added emptyP def

16 years agodon't set O_NONBLOCK on FDs passed to fdToHandle
Simon Marlow [Tue, 22 Apr 2008 20:47:19 +0000 (20:47 +0000)]
don't set O_NONBLOCK on FDs passed to fdToHandle

16 years agoImprove docs for unsafeCoerce
Malcolm.Wallace@cs.york.ac.uk [Tue, 22 Apr 2008 13:05:47 +0000 (13:05 +0000)]
Improve docs for unsafeCoerce
Make it clear that compilers differ.  Point to GHC docs in GHC.Base, and
add a short description of nhc98's representation-safe conversions.

16 years agoSpelling only
simonpj@microsoft.com [Tue, 22 Apr 2008 08:20:33 +0000 (08:20 +0000)]
Spelling only

16 years agoIn docs for unsafeCoerce, point to unsafeCoerce#
simonpj@microsoft.com [Mon, 21 Apr 2008 15:22:51 +0000 (15:22 +0000)]
In docs for unsafeCoerce, point to unsafeCoerce#

16 years agoTurn off the gcd/lcm optimisations for Integer for now
Ian Lynagh [Fri, 18 Apr 2008 19:02:38 +0000 (19:02 +0000)]
Turn off the gcd/lcm optimisations for Integer for now
This makes it easier to experiment with other implementations

16 years agoOrdering has now moved to ghc-prim
Ian Lynagh [Sat, 12 Apr 2008 10:07:41 +0000 (10:07 +0000)]
Ordering has now moved to ghc-prim

16 years agofix types for __hscore_st_dev() and __hscore_st_ino()
Simon Marlow [Wed, 19 Mar 2008 17:41:01 +0000 (17:41 +0000)]
fix types for __hscore_st_dev() and __hscore_st_ino()

16 years agogive an absolute path to 'harch'
Malcolm.Wallace@cs.york.ac.uk [Thu, 27 Mar 2008 14:29:12 +0000 (14:29 +0000)]
give an absolute path to 'harch'

16 years agoMove Word64/Int64/Word32/Int32 primitives into ghc-prim
Ian Lynagh [Tue, 25 Mar 2008 20:26:34 +0000 (20:26 +0000)]
Move Word64/Int64/Word32/Int32 primitives into ghc-prim

16 years agoUpdate .darcs-boring
Ian Lynagh [Mon, 24 Mar 2008 20:58:08 +0000 (20:58 +0000)]
Update .darcs-boring
GHC/Prim.hs, GHC/PrimopWrappers.hs are no longer generated in this package

16 years agoRemove GHC.PrimopWrappers from base's exposed modules list
Ian Lynagh [Mon, 24 Mar 2008 20:57:34 +0000 (20:57 +0000)]
Remove GHC.PrimopWrappers from base's exposed modules list

16 years agobase now uses build-type: Configure
Ian Lynagh [Sun, 23 Mar 2008 19:11:46 +0000 (19:11 +0000)]
base now uses build-type: Configure

16 years agoMove Integer out into its own package
Ian Lynagh [Sun, 23 Mar 2008 18:13:42 +0000 (18:13 +0000)]
Move Integer out into its own package
We now depend on the new integer package.
We also depend on a new ghc-prim package, which has GHC.Prim,
GHC.PrimopWrappers, and new modules GHC.Bool and GHC.Generics,
containing Bool and Unit/Inl/Inr respectively.

16 years agoList extensions used rather than using the -fglasgow-exts hammer
Ian Lynagh [Sat, 22 Mar 2008 13:36:22 +0000 (13:36 +0000)]
List extensions used rather than using the -fglasgow-exts hammer

16 years agoRemove a gratuitous pattern type sig
Ian Lynagh [Fri, 21 Mar 2008 01:13:56 +0000 (01:13 +0000)]
Remove a gratuitous pattern type sig

16 years agoAn even better definition for (^) (trac #1687)
Ian Lynagh [Thu, 20 Mar 2008 00:39:57 +0000 (00:39 +0000)]
An even better definition for (^) (trac #1687)

16 years agoReplace (^) with a faster variant (from trac #1687)
Ian Lynagh [Tue, 18 Mar 2008 00:30:17 +0000 (00:30 +0000)]
Replace (^) with a faster variant (from trac #1687)

16 years agoAdd partitionEithers, lefts, and rights.
Ian Lynagh [Fri, 14 Mar 2008 19:30:37 +0000 (19:30 +0000)]
Add partitionEithers, lefts, and rights.
Patch from Russell O'Connor, trac proposal #974.

16 years agoSystem.Console.GetOpt mistakenly rejects options as ambiguous.
Malcolm.Wallace@cs.york.ac.uk [Wed, 12 Mar 2008 11:10:47 +0000 (11:10 +0000)]
System.Console.GetOpt mistakenly rejects options as ambiguous.
From "Eelis van der Weegen" <haskell-libs@contacts.eelis.net>.
Testcase:

> import System.Console.GetOpt
>
> type Color = String
>
> optsDesc :: [OptDescr Color]
> optsDesc = [Option "" ["color", "colour"]
>                    (ReqArg id "color") "Foreground color"]
>
> main = do
>   let args = ["--col=blue"]
>   case getOpt RequireOrder optsDesc args of
>     (_, _, err:_) -> putStrLn err
>     _ -> return ()

Output:
  option `--col' is ambiguous; could be one of:
      --color=color, --colour=color  Foreground color
      --color=color, --colour=color  Foreground color

This error is silly, because the two alternatives listed are the same
option.  The problem is caused by incorrect use of a generator in a list
comprehension.

16 years agountabify
Don Stewart [Mon, 10 Mar 2008 00:54:55 +0000 (00:54 +0000)]
untabify

16 years agountabify
Don Stewart [Sat, 8 Mar 2008 01:42:56 +0000 (01:42 +0000)]
untabify

16 years agountabify
Don Stewart [Sat, 8 Mar 2008 01:41:29 +0000 (01:41 +0000)]
untabify

16 years agountabify
Don Stewart [Sat, 8 Mar 2008 01:40:40 +0000 (01:40 +0000)]
untabify

16 years agountabify
Don Stewart [Sat, 8 Mar 2008 01:35:56 +0000 (01:35 +0000)]
untabify

16 years agountabify
Don Stewart [Sat, 8 Mar 2008 01:24:57 +0000 (01:24 +0000)]
untabify

16 years agountabify
Don Stewart [Sat, 8 Mar 2008 01:20:59 +0000 (01:20 +0000)]
untabify

16 years agountabify
Don Stewart [Fri, 7 Mar 2008 19:27:27 +0000 (19:27 +0000)]
untabify

16 years agountabify
Don Stewart [Wed, 5 Mar 2008 03:37:12 +0000 (03:37 +0000)]
untabify

16 years agountabify
Don Stewart [Wed, 5 Mar 2008 01:58:27 +0000 (01:58 +0000)]
untabify

16 years agountabify
Don Stewart [Wed, 5 Mar 2008 01:25:30 +0000 (01:25 +0000)]
untabify