Commit ee13c263 authored by rrt's avatar rrt

[project @ 2000-07-10 16:15:33 by rrt]

Removed carriage returns (\r) from source files. Please don't check in such
things; they can cause problems on Cygwin (funnily enough). I'm looking into
how to avoid commiting carriage returns when working under Windows.
parent caea0cb9
This diff is collapsed.
The Glasgow Haskell Compiler -- version 4.08
==============================================
We are pleased to announce a new release of the Glasgow Haskell
Compiler (GHC), version 4.08. The source distribution is freely
available via the World-Wide Web and through anon. FTP; details below.
Haskell is "the" standard lazy functional programming language; the
current language version is Haskell 98, agreed in December 1998.
Haskell related information is available from the Haskell home page at
http://www.haskell.org/
GHC's Web page lives at
http://www.haskell.org/ghc/
+ What's new
=============
This should be a stable release. There have been many enhancements
since 4.06, and shed-loads of bug-fixes (one shed (imperial) ~ one ton
(US)).
There are the following changes
- New profiling subsystem, based on cost-centre stacks.
- Working x86 native code generator: now it works properly, runs
about twice as fast as compiling via C, and is on a par for
run-time speed (except in FP-intensive programs).
- Implicit parameters (i.e. dynamic scoping without the pain).
- DEPRECATED pragma for marking obsolescent interfaces.
- In the wake of hslibs, a new package system for
libraries. -package should now be used instead of -syslib.
- Result type signatures work.
- Many tiresome long-standing bugs and problems (e.g. the trace
problem) have been fixed.
- Many error messages have been made more helpful and/or
accurate.
For full details see the release notes:
http://www.haskell.org/ghc/docs/4.08/users_guide/release-4-08.html
+ Mailing lists
================
We run mailing lists for GHC users and bug reports; to subscribe, send
mail to majordomo@haskell.org; the msg body should be:
subscribe glasgow-haskell-{users,bugs} Your Name <you@where.soever>
or
subscribe cvs-ghc Your Name <you@where.soever>
Please send bug reports about GHC to glasgow-haskell-bugs@haskell.org;
GHC users hang out on glasgow-haskell-users@haskell.org. Bleeding
edge CVS users party on cvs-ghc@haskell.org.
+ On-line GHC-related resources
================================
Relevant URLs on the World-Wide Web:
GHC home page http://www.haskell.org/ghc/
Haskell home page http://www.haskell.org/
comp.lang.functional FAQ http://www.cs.nott.ac.uk/~gmh/faq.html
+ How to get it
================
The easy way is to go to the WWW page, which should be
self-explanatory:
http://www.haskell.org/ghc/
Once you have the distribution, please follow the pointers in the
README file to find all of the documentation about this release. NB:
preserve modification times when un-tarring the files (no `m' option
for tar, please)!
+ System requirements
======================
To compile the sources, you need a machine with 32+MB memory, GNU C
(`gcc'), `perl' plus a version of GHC installed (3.02 at least). This
release is known to work on the following platforms:
* i386-unknown-{linux,freebsd,netbsd,cygwin32,mingw32}
* sparc-sun-{sunos4,solaris2}
* hppa1.1-hp-hpux{9,10}
Ports to the following platforms should be relatively easy (for a
wunderhacker), but haven't been tested due to lack of time/hardware:
* i386-unknown-solaris2
* alpha-dec-osf{2,3}
* mips-sgi-irix{5,6}
* {rs6000,powerpc}-ibm-aix
The builder's guide included in distribution gives a complete
run-down of what ports work; an on-line version can be found at
http://www.haskell.org/ghc/docs/4.08/building/building-guide.html
The Glasgow Haskell Compiler -- version 4.08
==============================================
We are pleased to announce a new release of the Glasgow Haskell
Compiler (GHC), version 4.08. The source distribution is freely
available via the World-Wide Web and through anon. FTP; details below.
Haskell is "the" standard lazy functional programming language; the
current language version is Haskell 98, agreed in December 1998.
Haskell related information is available from the Haskell home page at
http://www.haskell.org/
GHC's Web page lives at
http://www.haskell.org/ghc/
+ What's new
=============
This should be a stable release. There have been many enhancements
since 4.06, and shed-loads of bug-fixes (one shed (imperial) ~ one ton
(US)).
There are the following changes
- New profiling subsystem, based on cost-centre stacks.
- Working x86 native code generator: now it works properly, runs
about twice as fast as compiling via C, and is on a par for
run-time speed (except in FP-intensive programs).
- Implicit parameters (i.e. dynamic scoping without the pain).
- DEPRECATED pragma for marking obsolescent interfaces.
- In the wake of hslibs, a new package system for
libraries. -package should now be used instead of -syslib.
- Result type signatures work.
- Many tiresome long-standing bugs and problems (e.g. the trace
problem) have been fixed.
- Many error messages have been made more helpful and/or
accurate.
For full details see the release notes:
http://www.haskell.org/ghc/docs/4.08/users_guide/release-4-08.html
+ Mailing lists
================
We run mailing lists for GHC users and bug reports; to subscribe, send
mail to majordomo@haskell.org; the msg body should be:
subscribe glasgow-haskell-{users,bugs} Your Name <you@where.soever>
or
subscribe cvs-ghc Your Name <you@where.soever>
Please send bug reports about GHC to glasgow-haskell-bugs@haskell.org;
GHC users hang out on glasgow-haskell-users@haskell.org. Bleeding
edge CVS users party on cvs-ghc@haskell.org.
+ On-line GHC-related resources
================================
Relevant URLs on the World-Wide Web:
GHC home page http://www.haskell.org/ghc/
Haskell home page http://www.haskell.org/
comp.lang.functional FAQ http://www.cs.nott.ac.uk/~gmh/faq.html
+ How to get it
================
The easy way is to go to the WWW page, which should be
self-explanatory:
http://www.haskell.org/ghc/
Once you have the distribution, please follow the pointers in the
README file to find all of the documentation about this release. NB:
preserve modification times when un-tarring the files (no `m' option
for tar, please)!
+ System requirements
======================
To compile the sources, you need a machine with 32+MB memory, GNU C
(`gcc'), `perl' plus a version of GHC installed (3.02 at least). This
release is known to work on the following platforms:
* i386-unknown-{linux,freebsd,netbsd,cygwin32,mingw32}
* sparc-sun-{sunos4,solaris2}
* hppa1.1-hp-hpux{9,10}
Ports to the following platforms should be relatively easy (for a
wunderhacker), but haven't been tested due to lack of time/hardware:
* i386-unknown-solaris2
* alpha-dec-osf{2,3}
* mips-sgi-irix{5,6}
* {rs6000,powerpc}-ibm-aix
The builder's guide included in distribution gives a complete
run-down of what ports work; an on-line version can be found at
http://www.haskell.org/ghc/docs/4.08/building/building-guide.html
--!!! Testing export of unknown name
module Bar(bar) where
--!!! Testing export of unknown name
module Bar(bar) where
foo = foo
\ No newline at end of file
{-# OPTIONS -fglasgow-exts #-}
-- !!! Scoped type variables in result signatures
module ShouldCompile where
import PrelST
import PrelArr
f:: ST s Int
f:: ST s Int = do
v <- newSTRef 5
let g :: ST s Int
-- ^ should be in scope
g = readSTRef v
g
{-# OPTIONS -fglasgow-exts #-}
-- !!! Scoped type variables in result signatures
module ShouldCompile where
import PrelST
import PrelArr
f:: ST s Int
f:: ST s Int = do
v <- newSTRef 5
let g :: ST s Int
-- ^ should be in scope
g = readSTRef v
g
TOP=..
include $(TOP)/mk/boilerplate.mk
SUBDIRS = db2dvi.dir db2html.dir db2pdf.dir db2ps.dir db2rtf.dir
SUBDIRS = db2dvi.dir db2html.dir db2pdf.dir db2ps.dir db2rtf.dir \
dbindex.dir
include $(TOP)/mk/target.mk
-----------------------------------------------------------------------------
-- TableClass : Class for combinators used in building 2D tables.
--
-- Copyright (c) 1999 Andy Gill
--
-- This module is distributed as Open Source software under the
-- Artistic License; see the file "Artistic" that is included
-- in the distribution for details.
-----------------------------------------------------------------------------
module ClassTable (
Table(..),
showsTable,
showTable,
) where
infixr 4 `beside`
infixr 3 `above`
{----------------------------------------------------------------------------
These combinators can be used to build formated 2D tables.
The specific target useage is for HTML table generation.
----------------------------------------------------------------------------
Examples of use:
> table1 :: (Table t) => t String
> table1 = single "Hello" +-----+
|Hello|
This is a 1x1 cell +-----+
Note: single has type
single :: (Table t) => a -> t a
So the cells can contain anything.
> table2 :: (Table t) => t String
> table2 = single "World" +-----+
|World|
+-----+
> table3 :: (Table t) => t String
> table3 = table1 %-% table2 +-----%-----+
|Hello%World|
% is used to indicate +-----%-----+
the join edge between
the two Tables.
> table4 :: (Table t) => t String
> table4 = table3 %/% table2 +-----+-----+
|Hello|World|
Notice the padding on the %%%%%%%%%%%%%
smaller (bottom) cell to |World |
force the table to be a +-----------+
rectangle.
> table5 :: (Table t) => t String
> table5 = table1 %-% table4 +-----%-----+-----+
|Hello%Hello|World|
Notice the padding on the | %-----+-----+
leftmost cell, again to | %World |
force the table to be a +-----%-----------+
rectangle.
Now the table can be rendered with processTable, for example:
Main> processTable table5
[[("Hello",(1,2)),
("Hello",(1,1)),
("World",(1,1))],
[("World",(2,1))]] :: [[([Char],(Int,Int))]]
Main>
----------------------------------------------------------------------------}
class Table t where
-- There are no empty tables
--Single element table
single :: a -> t a
-- horizontal composition
beside :: t a -> t a -> t a
-- vertical composition
above :: t a -> t a -> t a
-- generation of raw table matrix
getMatrix :: t a -> [[(a,(Int,Int))]]
showsTable :: (Show a,Table t) => t a -> ShowS
showsTable table = shows (getMatrix table)
showTable :: (Show a,Table t) => t a -> String
showTable table = showsTable table ""
-----------------------------------------------------------------------------
-- TableClass : Class for combinators used in building 2D tables.
--
-- Copyright (c) 1999 Andy Gill
--
-- This module is distributed as Open Source software under the
-- Artistic License; see the file "Artistic" that is included
-- in the distribution for details.
-----------------------------------------------------------------------------
module ClassTable (
Table(..),
showsTable,
showTable,
) where
infixr 4 `beside`
infixr 3 `above`
{----------------------------------------------------------------------------
These combinators can be used to build formated 2D tables.
The specific target useage is for HTML table generation.
----------------------------------------------------------------------------
Examples of use:
> table1 :: (Table t) => t String
> table1 = single "Hello" +-----+
|Hello|
This is a 1x1 cell +-----+
Note: single has type
single :: (Table t) => a -> t a
So the cells can contain anything.
> table2 :: (Table t) => t String
> table2 = single "World" +-----+
|World|
+-----+
> table3 :: (Table t) => t String
> table3 = table1 %-% table2 +-----%-----+
|Hello%World|
% is used to indicate +-----%-----+
the join edge between
the two Tables.
> table4 :: (Table t) => t String
> table4 = table3 %/% table2 +-----+-----+
|Hello|World|
Notice the padding on the %%%%%%%%%%%%%
smaller (bottom) cell to |World |
force the table to be a +-----------+
rectangle.
> table5 :: (Table t) => t String
> table5 = table1 %-% table4 +-----%-----+-----+
|Hello%Hello|World|
Notice the padding on the | %-----+-----+
leftmost cell, again to | %World |
force the table to be a +-----%-----------+
rectangle.
Now the table can be rendered with processTable, for example:
Main> processTable table5
[[("Hello",(1,2)),
("Hello",(1,1)),
("World",(1,1))],
[("World",(2,1))]] :: [[([Char],(Int,Int))]]
Main>
----------------------------------------------------------------------------}
class Table t where
-- There are no empty tables
--Single element table
single :: a -> t a
-- horizontal composition
beside :: t a -> t a -> t a
-- vertical composition
above :: t a -> t a -> t a
-- generation of raw table matrix
getMatrix :: t a -> [[(a,(Int,Int))]]
showsTable :: (Show a,Table t) => t a -> ShowS
showsTable table = shows (getMatrix table)
showTable :: (Show a,Table t) => t a -> String
showTable table = showsTable table ""
This diff is collapsed.
-----------------------------------------------------------------------------
-- $Id: OptTable.hs,v 1.1 1999/11/12 11:54:17 simonmar Exp $
--
-- OGI_Table : Class for combinators used in building 2D tables.
--
-- Copyright (c) 1999 Andy Gill
--
-- This module is distributed as Open Source software under the
-- Artistic License; see the file "Artistic" that is included
-- in the distribution for details.
-----------------------------------------------------------------------------
module OptTable (
OptTable, -- abstract
single,
beside,
above,
getMatrix,
) where
import qualified ClassTable as TC
instance TC.Table OptTable where
single = OptTable.single
beside = OptTable.beside
above = OptTable.above
getMatrix = OptTable.getMatrix
instance (Show a) => Show (OptTable a) where
showsPrec p = TC.showsTable
type TableI a = [[(a,(Int,Int))]] -> [[(a,(Int,Int))]]
data OptTable a = Table (Int -> Int -> TableI a) Int Int
{-
- Perhaps one day I'll fell adventureous, and write the Show instance
- to show boxes aka the above ascii renditions.
-}
-- You can create a (1x1) table entry
single :: a -> OptTable a
single a = Table (\ x y z -> [(a,(x+1,y+1))] : z) 1 1
-- You can compose tables, horizonally and vertically
above :: OptTable a -> OptTable a -> OptTable a
beside :: OptTable a -> OptTable a -> OptTable a
t1 `above` t2 = trans (combine (trans t1) (trans t2) (.))
t1 `beside` t2 = combine t1 t2 (\ lst1 lst2 r ->
let
-- Note this depends on the fact that
-- that the result has the same number
-- of lines as the y dimention; one list
-- per line. This is not true in general
-- but is always true for these combinators.
-- I should assert this!
beside (x:xs) (y:ys) = (x ++ y) : beside xs ys
beside (x:xs) [] = x : xs ++ r
beside [] (y:ys) = y : ys ++ r
beside [] [] = r
in
beside (lst1 []) (lst2 []))
-- trans flips (transposes) over the x and y axis of
-- the table. It is only used internally, and typically
-- in pairs, ie. (flip ... munge ... (un)flip).
trans :: OptTable a -> OptTable a
trans (Table f1 x1 y1) = Table (flip f1) y1 x1
combine :: OptTable a
-> OptTable b
-> (TableI a -> TableI b -> TableI c)
-> OptTable c
combine (Table f1 x1 y1) (Table f2 x2 y2) comb = Table new_fn (x1+x2) max_y
where
max_y = max y1 y2
new_fn x y =
case compare y1 y2 of
EQ -> comb (f1 0 y) (f2 x y)
GT -> comb (f1 0 y) (f2 x (y + y1 - y2))
LT -> comb (f1 0 (y + y2 - y1)) (f2 x y)
-- This is the other thing you can do with a Table;
-- turn it into a 2D list, tagged with the (x,y)
-- sizes of each cell in the table.
getMatrix :: OptTable a -> [[(a,(Int,Int))]]
getMatrix (Table r _ _) = r 0 0 []
-----------------------------------------------------------------------------
-- $Id: OptTable.hs,v 1.2 2000/07/10 16:15:34 rrt Exp $
--
-- OGI_Table : Class for combinators used in building 2D tables.
--
-- Copyright (c) 1999 Andy Gill
--
-- This module is distributed as Open Source software under the
-- Artistic License; see the file "Artistic" that is included
-- in the distribution for details.
-----------------------------------------------------------------------------
module OptTable (
OptTable, -- abstract
single,
beside,
above,
getMatrix,
) where
import qualified ClassTable as TC
instance TC.Table OptTable where
single = OptTable.single
beside = OptTable.beside
above = OptTable.above
getMatrix = OptTable.getMatrix
instance (Show a) => Show (OptTable a) where
showsPrec p = TC.showsTable
type TableI a = [[(a,(Int,Int))]] -> [[(a,(Int,Int))]]
data OptTable a = Table (Int -> Int -> TableI a) Int Int
{-
- Perhaps one day I'll fell adventureous, and write the Show instance
- to show boxes aka the above ascii renditions.
-}
-- You can create a (1x1) table entry
single :: a -> OptTable a
single a = Table (\ x y z -> [(a,(x+1,y+1))] : z) 1 1
-- You can compose tables, horizonally and vertically
above :: OptTable a -> OptTable a -> OptTable a
beside :: OptTable a -> OptTable a -> OptTable a
t1 `above` t2 = trans (combine (trans t1) (trans t2) (.))
t1 `beside` t2 = combine t1 t2 (\ lst1 lst2 r ->
let
-- Note this depends on the fact that
-- that the result has the same number
-- of lines as the y dimention; one list
-- per line. This is not true in general
-- but is always true for these combinators.
-- I should assert this!
beside (x:xs) (y:ys) = (x ++ y) : beside xs ys
beside (x:xs) [] = x : xs ++ r
beside [] (y:ys) = y : ys ++ r
beside [] [] = r
in
beside (lst1 []) (lst2 []))
-- trans flips (transposes) over the x and y axis of
-- the table. It is only used internally, and typically
-- in pairs, ie. (flip ... munge ... (un)flip).
trans :: OptTable a -> OptTable a
trans (Table f1 x1 y1) = Table (flip f1) y1 x1
combine :: OptTable a
-> OptTable b
-> (TableI a -> TableI b -> TableI c)
-> OptTable c
combine (Table f1 x1 y1) (Table f2 x2 y2) comb = Table new_fn (x1+x2) max_y
where
max_y = max y1 y2
new_fn x y =
case compare y1 y2 of
EQ -> comb (f1 0 y) (f2 x y)
GT -> comb (f1 0 y) (f2 x (y + y1 - y2))
LT -> comb (f1 0 (y + y2 - y1)) (f2 x y)
-- This is the other thing you can do with a Table;
-- turn it into a 2D list, tagged with the (x,y)
-- sizes of each cell in the table.
getMatrix :: OptTable a -> [[(a,(Int,Int))]]
getMatrix (Table r _ _) = r 0 0 []
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment