_N_o_n_ _u_p_w_a_r_d_s_ _c_o_m_p_a_t_i_b_l_e_ _c_h_a_n_g_e_s (between release one and release two)

Release two has a number of significant new  features  -  see  next  two
sections  -  but  most release one scripts should recompile and run with
none or only trivial changes needed.  The small  number  of  non-upwards
compatible changes are listed here.

1) Algebraic data types with laws (equations for constructors  in  `=>')
and  with  strictness annotations (`!' written after some of the fields)
are no longer officially a part of  Miranda.   Language  simplification.
For a transitional period (ie at least until release three) the compiler
will still compile these correctly, but an `obsolete feature' warning is
now  given.   A separate manual section sketches you how you can rewrite
your scripts to remove these features, if you wish to do so.

2) For compatibility with Bird and Wadler(*) an (optional) keyword  `if'
has been introduced after the guard comma.  Thus
	abs x =  x, if x>=0
	      = -x, otherwise
Since the `if' is optional, the change is upwards compatible - except in
one respect, NAMELY THAT `if' HAS BECOME A RESERVED WORD  (sorry!).   If
you  were  using  `if'  as  the  name  of a conditional function in your
scripts, we suggest you change its name to `cond', or `test'.

3) Changes to the standard environment.
 i) The definition of `foldl' has been changed to be the same as that in
Bird and Wadler, removing a serious cause of confusion.  Uses of the old
foldl will be picked up by the compiler as a  type  error.   The  change
needed  is  trivial  -  the operator supplied to foldl now takes its two
arguments in the opposite order.  The quickest way to  fix  this  is  to
replace each occurrence of `foldl op ...' by `foldl (converse op) ...'

ii) The following new names have been added to the standard environment.
	converse foldl1 foldr1 fst hugenum log10 map2 max2 merge min2
	scan showfloat showscaled snd system tinynum zip
See standard environment for documentation.  If you are have defined one
of these identifiers at top-level in a script the compiler will report a
nameclash.  There is also a new  reserved  word,  `readvals'  (see  `New
language features').

4) A missing `, otherwise' now generates a  syntax  error,  rather  than
a warning.

5) Miranda now stores integers in a  different  internal  representation
from  floating  point  numbers.   Both kinds of number are both still of
type `num' for typechecking purposes, and there is an automatic  runtime
coercion  from  integer to floating point when required.  This makes the
change upwards compatible in almost all cases.   However,  `div',  `mod'
and  `!'  (subscripting) now give a runtime error if applied to floating
point arguments: `fractional number where integer expected'.

If you get unexpected errors of this kind,  the  most  likely  cause  is
writing  `/'  (fractional division) where you should have `div' (integer
division).  Example: `8/4' is 2.0, whereas `8 div 4' is 2.  Since  there
is  now a distinction between 2.0 and 2, you can no longer use `/' where
`div' was intended.

6)  The  default  number  printing  function,  `shownum',   now   prints
fractional  numbers  to  12  decimal  places,  but  with trailing zeroes
suppressed, instead of a fixed 6 places.   (Since  Miranda  uses  double
precision  real arithmetic, it seems misleading to show only six places.
You can always say `showfloat 6' if you want the old behaviour.)

Numerous minor bugs  have  also  been  fixed,  including  all  the  bugs
reported by user sites.  These are not listed here, since we assume that
failure to preserve bugs will not be regarded as a violation of  upwards
compatibility (!)

Note that a quick way to  recompile  all  the  Miranda  scripts  in  the
current directory is to say
	mira -make *.m
as  a UNIX command.  Recompiling your scripts will be sufficient to pick
up all instances of problems 1) to 4) above, as syntax or  type  errors.
Problem 5), if present, will show up as a runtime error.

------------------------------------------------------------------------
(*) Richard Bird and  Philip  Wadler  ``An  Introduction  to  Functional
Programming'' Prentice Hall International, March 1988.

