cvs commit: fptools/ghc/compiler/prelude PrelNames.lhs fptools/ghc/compiler/typecheck TcDeriv.lhs TcGenDeriv.lhs fptools/librarie s/base/Data Dynamic.hs HashTable.hs IORef.hs fptools/libraries/base/Data/A rray/IO Internals.hs fptools/libraries/base/GHC IOBase.lhs

Simon Peyton Jones simonpj@glass.cse.ogi.edu
Thu, 17 Apr 2003 08:23:38 -0700


simonpj     2003/04/17 08:23:38 PDT

  Modified files:
    ghc/compiler/prelude PrelNames.lhs 
    ghc/compiler/typecheck TcDeriv.lhs TcGenDeriv.lhs 
    libraries/base/Data  Dynamic.hs HashTable.hs IORef.hs 
    libraries/base/Data/Array/IO Internals.hs 
    libraries/base/GHC   IOBase.lhs 
  Log:
  	----------------------------------
  	Implement Typeable properly
  	----------------------------------
  
  1.  Add 'deriving' for Typeable class. So you can say
  
  	data T a b = .... deriving( Typeable )
  
      At the moment you only get this if you ask for it. If you say
      nothing you get nothing.
  
  2.  Implement Typeable better, with proper O(1) comparison of
      type representations
  
  3.  Add the 'cast' operation described in 'Scrap your boilerplate'
      and use it.
  
  4.  Consequence: need to move the definition of IOArray from
      Data.Array.IO.Internals to GHC.IOBase, where it joins IORef.
      This is necssary so that HashTable can be low down in the compilation
      hierarchy, and hence so can Dynamic.
  
  	WARNING: I'm not certain the imports in HashTable and Dynamic
  		 will all be right for Hugs and NHC. I hope you can
  	  	 fix them up.
  
  Revision  Changes    Path
  1.71      +21 -2     fptools/ghc/compiler/prelude/PrelNames.lhs
  1.110     +63 -62    fptools/ghc/compiler/typecheck/TcDeriv.lhs
  1.93      +38 -0     fptools/ghc/compiler/typecheck/TcGenDeriv.lhs
  1.19      +116 -69   fptools/libraries/base/Data/Dynamic.hs
  1.3       +28 -17    fptools/libraries/base/Data/HashTable.hs
  1.15      +2 -2      fptools/libraries/base/Data/IORef.hs
  1.2       +5 -18     fptools/libraries/base/Data/Array/IO/Internals.hs
  1.27      +36 -0     fptools/libraries/base/GHC/IOBase.lhs