Show
Ignore:
Timestamp:
08/01/08 13:56:05 (4 months ago)
Author:
audreyt
Message:

* Import Pugs 6.2.13.11 from Hackage into our source tree.
* Highlights:

  • Much faster startup time
  • Slightly faster compilation time (mostly due to refactored Pugs.AST.Internals)
  • Portable-to-Win32 readline thanks to Haskeline
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Internals.hs

    r17042 r21673  
    1414-} 
    1515 
    16 module Pugs.Internals ( module X ) where 
     16module Pugs.Internals ( module Pugs.Compat ) where 
    1717 
    18 import Pugs.Internals.Cast    as X  
    19 import Pugs.Internals.Global  as X  
    20 import Pugs.Internals.ID      as X  
    21 import Pugs.Internals.Monads  as X  
    22 import Pugs.Internals.String  as X  
    23 import Pugs.Compat            as X  
    24  
    25 import Control.Concurrent     as X  
    26 import Control.Concurrent.STM as X  
    27 import Control.Exception      as X (catchJust, errorCalls, Exception(..)) 
    28 import Control.Monad          as X (replicateM, forM, forM_, MonadPlus(..), msum, liftM2, liftM3, guard, foldM, unless, liftM, filterM, join, when) 
    29 import Control.Monad.Error    as X (MonadError(..), ErrorT(..), Error(..)) 
    30 import Control.Monad.Fix      as X (fix) 
    31 import Control.Monad.Identity as X (Identity(..)) 
    32 import Control.Monad.Reader   as X (MonadReader(..), ReaderT(..), asks) 
    33 import Control.Monad.State    as X (MonadState(..), gets, modify) 
    34 import Control.Monad.Trans    as X (MonadIO(..), MonadTrans(..)) 
    35 import Control.Monad.Writer   as X (MonadWriter(..), WriterT(..), censor) 
    36 import Data.Array             as X (elems) 
    37 import Data.Bits              as X hiding (shift) 
    38 import Data.ByteString        as X (ByteString) 
    39 import Data.Char              as X  
    40 import Data.Complex           as X  
    41 import Data.Dynamic           as X hiding (cast) 
    42 import Data.Either            as X  
    43 import Data.Generics          as X (Data) 
    44 import Data.IORef             as X  
    45 import Data.IntMap            as X (IntMap) 
    46 import Data.List              as X ( (\\), find, genericLength, insert, sortBy, intersperse, partition, group, sort, genericReplicate, isPrefixOf, isSuffixOf, genericTake, genericDrop, unfoldr, nub, nubBy, transpose, delete, foldl') 
    47 import Data.Map               as X (Map) 
    48 import Data.Maybe             as X  
    49 import Data.Monoid            as X  
    50 import Data.Ratio             as X  
    51 import Data.Sequence          as X (Seq, singleton) 
    52 import Data.Set               as X (Set) 
    53 import Data.Time              as X  
    54 import Data.Time.Clock.POSIX  as X  
    55 import Data.Tree              as X  
    56 import Data.Unique            as X  
    57 import Data.Word              as X hiding (Word) 
    58 import Debug.Trace            as X  
    59 import GHC.Conc               as X (unsafeIOToSTM) 
    60 import GHC.Exts               as X (unsafeCoerce#, Word(W#), Word#) 
    61 import GHC.PArr               as X  
    62 import Network                as X  
    63 import Numeric                as X (showHex) 
    64 import RRegex                 as X  
    65 import RRegex.Syntax          as X  
    66 import System.Cmd             as X  
    67 import System.Directory       as X (Permissions(..), getPermissions, getTemporaryDirectory, createDirectory, removeDirectory, removeFile, getDirectoryContents, getModificationTime) 
    68 import System.Environment     as X (getArgs, withArgs, getProgName) 
    69 import System.Exit            as X  
    70 import System.IO              as X ( Handle, stdin, stdout, hClose, hGetLine, hGetChar, hGetContents, openFile, hSetBinaryMode, hPutStr, hPutStrLn, IOMode(..), stderr, SeekMode(..), hSetBuffering, BufferMode(..), hIsTerminalDevice, hFlush, hPrint, isEOF, hSeek, hTell, hIsOpen, hIsClosed, hIsReadable, hIsWritable, hIsSeekable) 
    71 import System.IO.Error        as X (ioeGetErrorString, isUserError) 
    72 import System.IO.Unsafe       as X  
    73 import System.Mem             as X  
    74 import System.Mem.Weak        as X  
    75 import System.Process         as X  
    76 import System.Random          as X hiding (split) 
    77  
    78 -- Instances. 
    79 instance Show Unique where 
    80     show = show . hashUnique 
    81 instance (Typeable a, Typeable b) => Show (a -> b) where 
    82     show _ = "(" ++ typA ++ " -> " ++ typB ++ ")" 
    83         where 
    84         typA = show $ typeOf (undefined :: a) 
    85         typB = show $ typeOf (undefined :: b) 
    86 instance (Typeable a, Typeable b) => Eq (a -> b) where 
    87     x == y = show x == show y 
    88 instance (Typeable a, Typeable b) => Ord (a -> b) where 
    89     compare x y = compare (show x) (show y) 
    90 instance Eq Dynamic where 
    91     x == y = show x == show y 
    92 instance Ord Dynamic where 
    93     compare x y = compare (show x) (show y) 
    94  
    95 instance Typeable1 [::] where 
    96     typeOf1 _ = mkTyConApp (mkTyCon "[::]") [] 
     18import Pugs.Compat