[cvs-nhc98] Added modules to obtain a trusted tracing Prelude and modu

User olaf olaf@sparud.net
Fri, 14 Dec 2001 17:44:58 +0100 (CET)


olaf: Fri Dec 14 17:44:58 CET 2001

Update of /usr/src/master/nhc/src/prelude/Hat
In directory hinken:/tmp/cvs-serv3026/src/prelude/Hat

Modified Files:
	Hat.hs TPrelude.hs 
Added Files:
	CharTracing.hs PreludeBasic.hs PreludeBuiltin.hs 
	PreludeTracing.hs TPreludeBuiltinTypes.hs 
Removed Files:
	Char.hs IO.hs IOPrimitives.hs Numeric.hs Prelude.hs 
	Primitives.hs Ratio.hs 
Log Message:
Added modules to obtain a trusted tracing Prelude and module Char.
(Removed previous Prelude modules added by Malcolm.)
Extended the transformation to build tracing wrappers to Haskell
functions from foreign haskell declarations.
Corrected small bugs in pretty printing.

Purpose of new modules:

TPreludeBuiltinTypes.hs  (imports Hat and original Prelude)
  Tracing version of types that are not definable in Haskell
  or are used by functions that are not definable in Haskell

PreludeBuiltin.hs  (imports PreludeBuiltinTypes and original Char)
  Contains foreign haskell declarations for all functions
  not (portably) definable in Haskell.
  Has to be transformed into TPreludeBuiltin.hs

PreludeBasic.hs  (imports PreludeBuiltin)
  Contains all parts of the Prelude and Char (both are mutually
  recursive) that can be expressed in Haskell (assuming 
  nhc98's ability to derive instances of [],(,,,) etc).
  Has to be transformed into TPreludeBasic.hs

PreludeTracing.hs (imports PreludeBasic)
  Wrapper that exports just the stuff normally defined in the 
  Prelude. 
  Has to be transformed into TPreludeTracing.hs and renamed to TPrelude.hs.
  The original name cannot be Prelude.hs because then nhc98
  confuses it with the original Prelude.

CharTracing.hs (imports PreludeBasic)
  Like PreludeTracing.hs, but for the standard library module Char.


Currently the transformation falls over module PreludeBasic, the preceeding ones can be transformed/compiled.

The division between modules Hat and TPreludeBuiltinTypes and arbitrary and there is some redundancy. In the future contents may be exchanged.

Module TPrelude needs to be removed when this Prelude generation mechanism works. Currently it is still there and the Makefile compiles it.