------------------------------------------------------------------------------ __________ __________ __________ __________ ________ / _______/ / ____ / / _______/ / _______/ / ____ \ / / _____ / / / / / /______ / /______ / /___/ / / / /_ / / / / / / _______/ / _______/ / __ __/ / /___/ / / /___/ / / / / /______ / / \ \ /_________/ /_________/ /__/ /_________/ /__/ \__\ Functional programming environment, Version 2.30 README file for Gofer version 2.30, prepared for PC compatibles. Copyright Mark P Jones 1991-1994. CONDITIONS OF USE, DUPLICATION AND DISTRIBUTION ----------------------------------------------------------------------- Permission to use, copy, modify, and distribute this software and its documentation for any personal or educational use without fee is hereby granted, provided that: a) This copyright notice is retained in both source code and supporting documentation. b) Modified versions of this software are redistributed only if accompanied by a complete history (date, author, description) of modifications made; the intention here is to give appropriate credit to those involved, whilst simultaneously ensuring that any recipient can determine the origin of the software. c) The same conditions are also applied to any software system derived either in full or in part from Gofer. The name "Gofer" is not a trademark, registered or otherwise, and you are free to mention this name in published material, public and private correspondence, or other documents without restriction or obligation. Gofer is provided "as is" without express or implied warranty. ----------------------------------------------------------------------- These notes outline the use of the standard PC version of Gofer 2.30. If you have a 80386 based machine (or better) you will probably prefer to use the alternative version of Gofer in 386gofer.zip, which makes better use of the facilities provided by such machines. INTRODUCTION: ------------- Gofer is a functional programming language, closely related to Haskell, and includes the following features: o Lazy evaluation, higher order functions, pattern matching etc... o Wide range of built-in types with provision for defining new free datatypes and type synonyms. o Polymorphic type system with provision for overloading based on a system of type classes. o Full Haskell 1.2 expression and pattern syntax including lambda, case, conditional and let expressions, list comprehensions, operator sections, and wildcard, as and irrefutable patterns. o Partial implementation of Haskell 1.2 facilities for I/O, enabling the use of simple interactive programs and programs reading and writing text files. o User documentation, sample programs and source code freely available. o Runs (and originally developed) on PC compatible computers, but also works on Sun workstations. Code should be portable to many other kinds of machine. INSTALLATION: ------------- In order to use this package, you should make a Gofer directory: C:\> mkdir Gofer C:\> cd Gofer Unzip the PCGOF228 archive using either PKUNZIP or the INFO-ZIP unzip utility (don't forget the -d option if you use PKUNZIP): C:\GOFER> pkunzip -d pcgof228 or, using the INFO-ZIP equivalent: C:\GOFER> unzip pcgof228 (If you don't have either utility already, run the program unz50p1.exe supplied in the standard distribution; it is a self-extracting archive containing the INFO-ZIP utility). Move the file GOFER.EXE to a suitable directory somewhere on your path (or add C:\GOFER to the end of your path in AUTOEXEC.BAT). I have taken every precaution to try and ensure that the version of GOFER.EXE that you have received is free from virus infection, but I cannot make any guarantees. As with all software distributed in this way, you should take the appropriate precuations to protect yourself and your computer system. Full source code is available for those who wish to use Gofer in an environment where the use of external binary files is not generally allowed. You will need to set the environment variable GOFER to the name of the prelude file that you want to use. Either: C:\GOFER> set GOFER=C:\GOFER\standard.prelude if you want to use the full Gofer prelude, or: C:\GOFER> set GOFER=C:\GOFER\simple.prelude if you would rather use the simplified prelude (without support for overloading). If you intend to use Gofer frequently, it would probably be sensible to include one of these lines in your AUTOEXEC.BAT file. Note that some of the demonstration programs may not work correctly with the simple prelude. [Even though DOS only treats the first three characters after the period as significant, you must type in the prelude name with a full .prelude extension. Setting the prelude name to \GOFER\standard.PRE will not always work as you might expect.] You may wish to use an editor program from within Gofer. You will probably need to choose a fairly small editor, since the space available once Gofer is loaded will be fairly limited. In the past, I have recommended the use of Calvin 2.2, a free vi-clone. To make proper use of the editor you will need to set the environment variables EDITOR and EDITLINE. The appropriate settings for Calvin are: C:\GOFER> set EDITOR=vi C:\GOFER> set EDITLINE=vi +%d %s (these settings are actually builtin to this version of GOFER as defaults, but should give you an idea of the way these variables should be used). These lines can also be placed in your AUTOEXEC.BAT. The %d and %s characters in EDITLINE indicate the line number and filename which is to be edited. These fields may appear in either order in EDITLINE to support different editors. If your editor does not support this feature, you should set EDITLINE and EDITOR to be the same (not involving %s or %d). It is particularly nice if you can find an editor that supports starting at a given line since, should an error be detected in your programs, Gofer will be able to start the editor at (or close to) the line that caused the problem. A copy of the user documentation for Gofer (in either plain ASCII or LaTeX formats) should be available at the same site where you obtained this package, together with the full source code for Gofer. The DEMOS subdirectory contains a number of sample Gofer programs for use on the PC. Change to this directory and use the project file demoproj to try out some of these programs: (start Gofer with the command GOFER + demoproj, or give the command :p demoproj from within the interpreter). You will also find the code for Simon Peyton Jones and David Lester's fully modular lambda lifter in Haskell ... well, Gofer actually in DEMOS\MODULAR, and the code for my own Mini Prolog interpreter in Gofer in DEMOS\PROLOG. See the appropriate README files for details. REQUIREMENTS: ------------- This version of Gofer has been prepared for use with PC compatibles running DOS. This version will run on any machine with 640K of RAM (or more) running DOS 3.x or above. No special hardware (e.g mouse or graphics adapter) is required. You do not need a 286, 386 or 486 to run Gofer, although it is obviously best to use a faster machine if you have one. No matter how powerful your machine, this version of Gofer is limited to using 640K of RAM. You might also be able to run this version of Gofer on machines with 512K, but you will probably need to set a smaller heap size. Try starting Gofer with a command line of the form: GOFER -h12000 where 12000 is the number of cells that will be provided by the heap. This number may need to be adjusted either up or down to suit your configuration. If things are really tight, you might need to get a copy of the source and recompile without floating point support. Alternatively, you can use the old PC version 2.23 which is smaller (but also has a few bugs compared to the newest version). Enjoy! Mark ------------------------------------------------------------------------------