LML 0.99

10 views
Skip to first unread message

Lennart Augustsson

unread,
Aug 20, 1990, 7:11:56 PM8/20/90
to

*** NOW AVAILABLE ***

***** L M L version 0.99 *****

FTP a copy now and a free
Haskell compiler is included.

Well, here we go again. This is yet another version of the LML
compiler. Below are two blurbs: one on LML the other on the Haskell
compiler you get with it.

The LML compiler is pretty reliable, but the Haskell compiler you get
is very much in an alpha-testing stage. Testing is boring so I
decided to throw myself (or rather the compiler) to the wolves
instead. I'm sure you will find plenty of bugs in it. If you want
something reliable and bug free you just have to wait for one of the
other compilers that are being produced around the world.
DON'T BLAME HASKELL WHEN THINGS GO WRONG.

The compiler is available with anonynous FTP from skutt.cs.chalmers.se
(129.16.2.7). I suggest that people in the US and UK who get a copy
and are willing to put it up for redistribution do so and then send
out a message to this news group. Our transatlantic link is not as
good as it should be and so any relief in traffic is appreciated.
The files available are compressed tar archives. Make a fresh directory,
and do
uncompress file | tar xf -
to unpack.
* When you have ftp'd a copy, please send a mail and tell me! *

The files involved in LML compiler have been split into source and
binaries for different machines. Get the binaries for the machines
you need, and (if you want to) the source. If you want to run the
interactive version you have to get the source an compile it, the
binary file has been excluded from the distribution to save space.

The documentation on the Haskell part is almost non-existing, but I
hope you can use it anyhow.

There is no interactive Haskell yet, but that is also on my list of
things to do.

I'm sorry the Haskell compiler is so slow, I'm sure it can be improved a lot.

The compiler has not been properly bootstrapped on all platforms, but I
hope it will work (it takes lots of time to check bootstrapping!).

Send bug reports, suggestions etc. to

h...@cs.chalmers.se

-- Lennart Augustsson
augu...@cs.chalmers.se

---------------------------------------------------------------------

New LML release (0.99)
======================

There is now a new version of the LML compiler available. It is,
naturally, free of charge. The best way (both for us and for you) to
get a copy is via anonumous ftp to skutt.cs.chalmers.se (129.16.2.7)
where it is stored in pub/lml-0.99.*.tar.Z. (Described in more detail
below.) Uncompress, untar, install, and enjoy. If you don't have
access to the Internet and you don't know anyone who has a copy of LML
you can send us a tape or cartridge and we'll put LML on. This
process takes time, since it involves tedious work for us. If you ftp
a copy or get it from someone else, please send us an (electronic)
mail message and tell us so! It's nice to know who has it.

Files:
lml-0.99.src.tar.Z source for the compiler
lml-0.99.bin-sun3.tar.Z binaries for SUN3 (SUNOS 4.x)
lml-0.99.bin-sun4.tar.Z binaries for SUN4 (SUNOS 4.x)
lml-0.99.bin-mips.tar.Z binaries for DECstations
lml-0.99.bin-symmetry.tar.Z binaries for Sequent Symmetry

The distribution takes a lot of space. Around 15 Mbytes for the uncompressed
version with binaries for all machines.

News in brief:
- Floating point and arbitrary precision integers.
- Type synonyms.
- Major internal restructuring (to support Haskell).

For those of you who have not heard of LML, here's a short introduction:
LML is a strongly typed, lazy, purely functional language. The LML
system consist of a compiler in the traditional batch-oriented sense.
You give the compiler a file which it compiles and gives you an
executable file. The compiler produces code that is reasonable enough
to write "real" programs, such as the compiler itself. There are also
some primitives for I/O that allows you to write simple real time
programs.

The compiler runs on a number of machines, but only under UNIX (so
far). The machines and OS on which this distribution runs are

SUN3 SunOS 4.0
Sequent Symmetry Dynix 3.0.12
DECstation 3100 Ultrix
SUN4 SunOs 4.0


The following machines were once supported and could be made to work
with some effort.
Sequent Balance (this version has not been used for a
while, but probably works)
CRAY XMP Unicos
IBM RT/PC BSD 4.3
VAX BSD 4.3

The distribution contains binaries and source (in LML) for the
compiler and some contributed programs, as well as some documentation.

If you have any problems send us a mail.


Lennart Augustsson Thomas Johnsson

augu...@cs.chalmers.se john...@cs.glasgow.ac.uk
john...@cs.chalmers.se
Department of Computer Sciences
Chalmers University of Technology
S-412 96 Gothenburg
Sweden

--------------------------------------------------------------------

*** Haskell B. ***


The language that this compiler compiles is not quite Haskell, so it is called
"Haskell B.". The name of the compiler is thus hbc (Haskell B. Compiler).

Unimplemented things in Haskell B.:
-----------------------------------

* Float and Double have the same representation (double precision floats, often
IEEE 64 bit).

* The optional I/O requests ReadBinChannels and all relating to the type File
are unimplemented. The first because it does not make sense with the current
implementation of Bin the others because I don't like them.

* On renaming the fixity of the original name is not given to the new one.
This seems crazy to me.

* The compiler only supports one module per file, and interface files should
be machine produced (the compiler trusts them to be correct in certain ways).

* Derived operations on tuples are only supported up to 5-tuples.
Tuples in general are only available up to 15-tuples.

* The character '\f' is not handled as specified in the section on
presentation. It should clear the screen (or make a form feed), but it
is sent as it is to the standard output.

* "import Prelude" is not properly implemented, you can only have one such
clause in a module.

* In data definitions with infix constructors the type to the left of the
infix constructor has to be enclosed in parenthesis (sorry!).

Extensions in Haskell B.:
-------------------------
(Several of these extensions are turned off if the flag "-pedantic" is
given to hbc.)

** Lexical and syntactical:

* Gaps and \& are allowed in Char constants.

* Both "e" and "E" allowed for exponents in floating literals.
The e/E may be followed by a + if the exponent is positive.

* "-" is allowed in operators. The longest lexeme rule is easy to remember
so I see no reason to disallow it. (Exception: -- always starts a comment).

* ISO8859-1 letters are allowed in identifiers. It's time to stop
the english-speaking from forcing the rest of the world to adopt
their alphabet. (This is the choice in Eiffel and Modula-3.)
(I'm sorry that it's only western European languages that are
readily useable, but ISO8859-1 seems to be the only widely accepted
standard.)

* (,) is allowed and is the (curried) pairing function.

* Whitespace is allowed in (op).

* Both upper and lower case letters (and : and non-:) may begin both
value, constructor, and module identifiers.

* Module identifiers may be strings, allowing the exact filename of
an imported interface to be given. The module name given by import
and the one in the interface need not agree, the one in the interface
is taken as the module part of the original name.

* An extra ";" is allowed before a closing "}".

* The source file is processed by cpp (the C preprocessor). This is temporary.

* The string "{-:" starts annotations. Unknown or badly placed annotations
will cause an error.


** Language constructs:

* Sections are implemented. They are written (op aexp) and (aexp op)
with their usual meaning. As usual (- aexp) is not a section.

* A constructor can be declared to be strict in a subpart by putting a @
after the type. E.g.
data Length = MkLength Int @
gives you a type that is truly isomorphic to Int (and no runtime penalty at
all).

* The echoing is in an undefined state when the program starts. I have given
a technical (UNIX) reason for this in a posting to the Haskell mailing list.


** I/O

* New I/O requests: ChangeDirectory Name, and Sleep Int.


** Modules

* The namespace is flat (i.e. an exported name has to be globally unique)
by default. Use '-fno-flat-names' to get the non-flat namespace.
This is not changed by -pedantic. The reason for the flat name space is
to allow easy linking with LML programs.

* The fixity of constructors is exported. The omission of this from the report
is probably an oversight.


** Misc

* Instances are not derived automatically when the deriving clause is missing.
To get this you have to use "-fauto-derive". Automatic derivation produces a
lot of (usually unused) code.

* The derived show routines print nullary constructors without surrounding
parenthesis.

* The printing of floating point numbers is changed so that its rounded to
one decimal digit below the possible precision and trailing zeroes are
discarded. This does not guarentee that converting a float to a string
and converting back gives exactly the same number (as did the original
conversion), but it looks much nicer!

* I'm not sure all the functions in the standard prelude do what you would
expect. Don't blame me! I've just corrected enough bugs to compile them,
I've not changed their functionality (except for printing of numbers,
I didn't like them reversed).


General deficiencies and bugs:
------------------------------

* THERE ARE LOTS OF UNDISCOVERED BUGS!!!

* Error messages are poor, the line numbers are often off by far.

* The compiler just shows once again that "Compilers are large slow programs
producing large slow programs".

* Method calls (i.e. the calls used when overloading cannot be resolved at
compile time) are pretty slow. There is ample room for improvement in the
future.

* I don't really understand the overloading in Haskell so I'm pretty sure it's
not working properly.

* The module system is much more complicated that it looks at first glance
and the Haskell report is not very specific on some points. I don't know
if my interpretation is the intended one.

* The names related to the operators in an instance declaration are
globally visible even if the instance is not exported. This should
only matter if you have different (unexported) instance declarations
of the same class and type in different modules in the same program
and a flat namespace.

* The domain for Bin is flat. Although this is allowed by the specification
(as far as I can tell), it may not be what you expect.

* When reading a file the file is not read in when it is opened. This means
that any changes made in the file after it is opened, but before it is
read will be visible. This is (again) allowed by the spcification
(anything can happen with a file at any time due to "external actions"),
but unintuitive.

* The binaries produced by the compiler are very large. I don't know why
but I intend to find out.

* Lots of things have lousy implementation, in particular:
- method calls, there are several ways in which they can be improved
a lot.
- floating point, the compiler know nothing about them really.
- Integer, there is a very simple bignum package (in C) right now.
A good candidate for the future is an excellent bignum package
from DEC&INRIA.
- Arrays, although arrays have constant access time the way they
are built is not optimised at all.
- Etc.

* There is something wrong with floating point on DECstations, but there
will probably be a fix for this soon.


Compiling
---------
The compiler is called hbc and it's got the same flags as the LML
compiler (lmlc). The source files should have extension ".hs",
interface files are produced by the compiler and has extension ".hi".

It's possible to call LML from Haskell and vice versa. Use the flag
-fboth to get both the Haskell ".hi" and the LML ".t" files.
Overloading is not allowed in these cross calls (obviously, since
LML does not have overloading).
--

-- Lennart Augustsson
Email: augu...@cs.chalmers.se

Richard A. O'Keefe

unread,
Aug 21, 1990, 3:04:59 AM8/21/90
to
In article <40...@undis.cs.chalmers.se>, augu...@cs.chalmers.se (Lennart Augustsson) writes:
> ** Language constructs:

> * Sections are implemented. They are written (op aexp) and (aexp op)
> with their usual meaning. As usual (- aexp) is not a section.

What's a section?
--
The taxonomy of Pleistocene equids is in a state of confusion.

Lee McLoughlin

unread,
Aug 22, 1990, 6:44:26 PM8/22/90
to
A copy of the recently announed LML 0.99 is now available in the UK
from the UKUUG Software Distribution Service. It is available on
Janet from uk.ac.ic.doc.src with guest niftp the filenames are:
<LANGUAGES>lml/dir/file
where dir and file come from the directory listing below.

For example:
<LANGUAGES>lml/lml-0.99.src.tar.Z-split/lml-0.99.src.tar.Z-split-a

total 5
drwxr-xr-x 2 cshroot 1024 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split
drwxr-xr-x 2 cshroot 1024 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split
drwxr-xr-x 2 cshroot 1024 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split
drwxr-xr-x 2 cshroot 1024 Aug 22 17:04 lml-0.99.bin-symmetry.tar.Z-split
drwxr-xr-x 2 cshroot 1024 Aug 22 15:56 lml-0.99.src.tar.Z-split

/public/languages/lml/lml-0.99.bin-mips.tar.Z-split:
total 1759
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-a
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-b
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-c
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-d
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-e
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-f
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-g
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-h
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-i
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-j
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-k
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-l
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-m
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-n
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-o
-r--r--r-- 1 cshroot 80781 Aug 22 17:04 lml-0.99.bin-mips.tar.Z-split-p

/public/languages/lml/lml-0.99.bin-sun3.tar.Z-split:
total 1598
-r--r--r-- 1 cshroot 102400 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-a
-r--r--r-- 1 cshroot 102400 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-b
-r--r--r-- 1 cshroot 102400 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-c
-r--r--r-- 1 cshroot 102400 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-d
-r--r--r-- 1 cshroot 102400 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-e
-r--r--r-- 1 cshroot 102400 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-f
-r--r--r-- 1 cshroot 102400 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-g
-r--r--r-- 1 cshroot 102400 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-h
-r--r--r-- 1 cshroot 102400 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-i
-r--r--r-- 1 cshroot 102400 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-j
-r--r--r-- 1 cshroot 102400 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-k
-r--r--r-- 1 cshroot 102400 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-l
-r--r--r-- 1 cshroot 102400 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-m
-r--r--r-- 1 cshroot 102400 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-n
-r--r--r-- 1 cshroot 30583 Aug 22 16:09 lml-0.99.bin-sun3.tar.Z-split-o

/public/languages/lml/lml-0.99.bin-sun4.tar.Z-split:
total 1795
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-a
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-b
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-c
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-d
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-e
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-f
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-g
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-h
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-i
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-j
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-k
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-l
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-m
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-n
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-o
-r--r--r-- 1 cshroot 102400 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-p
-r--r--r-- 1 cshroot 3049 Aug 22 17:03 lml-0.99.bin-sun4.tar.Z-split-q

/public/languages/lml/lml-0.99.bin-symmetry.tar.Z-split:
total 1281
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-symmetry.tar.Z-split-a
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-symmetry.tar.Z-split-b
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-symmetry.tar.Z-split-c
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-symmetry.tar.Z-split-d
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-symmetry.tar.Z-split-e
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-symmetry.tar.Z-split-f
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-symmetry.tar.Z-split-g
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-symmetry.tar.Z-split-h
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-symmetry.tar.Z-split-i
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-symmetry.tar.Z-split-j
-r--r--r-- 1 cshroot 102400 Aug 22 17:04 lml-0.99.bin-symmetry.tar.Z-split-k
-r--r--r-- 1 cshroot 49773 Aug 22 17:04 lml-0.99.bin-symmetry.tar.Z-split-l

/public/languages/lml/lml-0.99.src.tar.Z-split:
total 1507
-r--r--r-- 1 cshroot 102400 Aug 22 15:56 lml-0.99.src.tar.Z-split-a
-r--r--r-- 1 cshroot 102400 Aug 22 15:56 lml-0.99.src.tar.Z-split-b
-r--r--r-- 1 cshroot 102400 Aug 22 15:56 lml-0.99.src.tar.Z-split-c
-r--r--r-- 1 cshroot 102400 Aug 22 15:56 lml-0.99.src.tar.Z-split-d
-r--r--r-- 1 cshroot 102400 Aug 22 15:56 lml-0.99.src.tar.Z-split-e
-r--r--r-- 1 cshroot 102400 Aug 22 15:56 lml-0.99.src.tar.Z-split-f
-r--r--r-- 1 cshroot 102400 Aug 22 15:56 lml-0.99.src.tar.Z-split-g
-r--r--r-- 1 cshroot 102400 Aug 22 15:56 lml-0.99.src.tar.Z-split-h
-r--r--r-- 1 cshroot 102400 Aug 22 15:56 lml-0.99.src.tar.Z-split-i
-r--r--r-- 1 cshroot 102400 Aug 22 15:56 lml-0.99.src.tar.Z-split-j
-r--r--r-- 1 cshroot 102400 Aug 22 15:56 lml-0.99.src.tar.Z-split-k
-r--r--r-- 1 cshroot 102400 Aug 22 15:56 lml-0.99.src.tar.Z-split-l
-r--r--r-- 1 cshroot 102400 Aug 22 15:56 lml-0.99.src.tar.Z-split-m
-r--r--r-- 1 cshroot 51375 Aug 22 15:56 lml-0.99.src.tar.Z-split-n
--
--
Lee McLoughlin phone: 071 589 5111 X 5037 fax: 071 581 8024
Department of Computing, Imperial College, 180 Queens Gate, London SW7 2BZ, UK
Janet: lm...@uk.ac.ic.doc Uucp: lm...@icdoc.UUCP (or ..!ukc!icdoc!lmjm)
DARPA: lm...@doc.ic.ac.uk (or lmjm%uk.ac....@nsfnet-relay.ac.uk)

Lennart Augustsson

unread,
Aug 25, 1990, 8:55:51 AM8/25/90
to
In article <35...@goanna.cs.rmit.oz.au> o...@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
>In article <40...@undis.cs.chalmers.se>, augu...@cs.chalmers.se (Lennart Augustsson) writes:
>> ** Language constructs:
>
>> * Sections are implemented. They are written (op aexp) and (aexp op)
>> with their usual meaning. As usual (- aexp) is not a section.
>
>What's a section?

A section is a shorthand for a lambda expression involving an operator.
E.g.
(+ 5) (1 /)
are the same as
(\ x -> x + 5) (\ x -> 1 / x)

The reason that (- e) is not (\x->x - e) is that this notation is
already used for prefix negation.

I have no idea why sections are called sections.

-- Lennart Augustsson

Reply all
Reply to author
Forward
0 new messages