Reorganisation of the source tree
[ghc-hetmet.git] / docs / comm / rts-libs / prelfound.html
diff --git a/docs/comm/rts-libs/prelfound.html b/docs/comm/rts-libs/prelfound.html
new file mode 100644 (file)
index 0000000..25407ee
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+  <head>
+    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+    <title>The GHC Commentary - Prelude Foundations</title>
+  </head>
+
+  <body BGCOLOR="FFFFFF">
+    <h1>The GHC Commentary - Prelude Foundations</h1>
+    <p>
+      The standard Haskell Prelude as well as GHC's Prelude extensions are
+      constructed from GHC's <a href="primitives.html">primitives</a> in a
+      couple of layers.  
+
+    <h4><code>PrelBase.lhs</code></h4>
+    <p>
+      Some most elementary Prelude definitions are collected in <a
+       href="http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/ghc/lib/std/PrelBase.lhs"><code>PrelBase.lhs</code></a>.
+      In particular, it defines the boxed versions of Haskell primitive types
+      - for example, <code>Int</code> is defined as
+    <blockquote><pre>
+data Int = I# Int#</pre>
+    </blockquote>
+    <p>
+      Saying that a boxed integer <code>Int</code> is formed by applying the
+      data constructor <code>I#</code> to an <em>unboxed</em> integer of type
+      <code>Int#</code>.  Unboxed types are hardcoded in the compiler and
+      exported together with the <a href="primitives.html">primitive
+       operations</a> understood by GHC.
+    <p>
+      <code>PrelBase.lhs</code> similarly defines basic types, such as,
+      boolean values
+    <blockquote><pre>
+data  Bool  =  False | True  deriving (Eq, Ord)</pre>
+    </blockquote>
+    <p>
+      the unit type
+    <blockquote><pre>
+data  ()  =  ()</pre>
+    </blockquote>
+    <p>
+      and lists
+    <blockquote><pre>
+data [] a = [] | a : [a]</pre>
+    </blockquote>
+    <p>
+      It also contains instance delarations for these types.  In addition,
+      <code>PrelBase.lhs</code> contains some <a href="prelude.html">tricky
+      machinery</a> for efficient list handling.
+
+    <p><small>
+<!-- hhmts start -->
+Last modified: Wed Aug  8 19:30:18 EST 2001
+<!-- hhmts end -->
+    </small>
+  </body>
+</html>