[clean-list] Clean 2.4 available for Windows, Linux and Mac OS X

John van Groningen johnvg at cs.ru.nl
Fri Dec 23 14:33:47 MET 2011


Clean 2.4 is now available for Windows and Linux (32 and 64 bit)
and Mac OS X (64 bit) at:

http://wiki.clean.cs.ru.nl/Download_Clean

New in version 2.4:

- A command line version for Mac OS X 64 bit Intel processors.
   Apple developer tool Xcode is required.

- The license for the runtime system, libraries and examples has
   been changed to the Simplified BSD License (previously LGPL).

- Language extensions:

   - Qualified imports.

     Identifiers can be imported qualified by adding 'qualified' after
     'import' in the import statement. For example:

       import qualified StdList;

       from StdList import qualified drop,++;

     Identifiers imported in this way can be used by prefixing the
     identifier with the module name between single quotes and a dot.
     If an identifier consists of special characters (for example ++)
     an additional single space is required between the dot and the
     identifier.

     For example:

       f l = 'StdList'.drop 1 (l 'StdList'. ++ [2]);

     Currently field names of records are not imported by an implicit
     qualified import, but can be imported with an explicit qualified
     import.

     Qualified names may only be used if a qualified import is used,
     not if the identifier is only imported by a normal (unqualified)
     import. An identifier may be imported both unqualified and
     qualified.

     Qualified imports may be used in definition modules, but qualified
     identifiers cannot be imported from a (definition) module.

   - Updates of unique array elements (since Clean 2.3):

     A unique array element of a (unique) array of unique elements
     can be selected and updated, if the selection (using ![ ]) and
     update (with the same index) occur in the same function and the
     array is not used in between (only the selected element is used).

     For example, below a unique row is selected, updated by inc_a
     and finally the row of the array is updated.

     inc_row :: !*{#*{#Int}} !Int -> *{#*{#Int}};
     inc_row a row_i
       # (row,a) = a![row_i];
         row = inc_a 0 row;
       = {a & [row_i]=row};

     inc_a :: !Int !*{#Int} -> *{#Int};
     inc_a i a
       | i<size a
         # (n,a) = a![i];
           a & [i]=n+1;
         = inc_a (i+1) a;
         = a;

   - Strictness annotations in types of class instance members

     Types of class instance members may contain additional strictness
     annotations. For example:

     class next a where
        next :: a -> a

     instance next Int where
       next :: !Int -> Int
       next x = x+1

     If such an instance is exported, the type of the instance member
     must be include in the definition module:

     instance next Int where
       next :: !Int -> Int

     If no additional strictness annotations are specified, it can still
     be exported without the type by:

     instance next Int

- The language report has been updated to Clean 2.2, but is still not
   up to date. A html version is included and the pdf version now has
   bookmarks.

- Bug fixes (Clean IDE, 64 bit runtime system, time profiler and
   code generation, compiler).

- generics are a bit more efficient (more efficient adapters and the
   GenericInfo info parameter is removed if it is not required).

- If the dynamic linker is used, the object code is no longer stored
   in the .lib file, but each object file is stored separately, and can
   be shared to save disk space. The .tcl and .typ files are smaller.

- The TCPIP library (without Object IO extensions) has been ported
   to Linux and Mac OS X.

- The part ot the Dynamics library that can be used without the dynamic
   linker is included in all versions. To use dynamics with clm add
   the -dynamics flag. clm does not recompile modules if -dynamics is
   enabled, this may result in an undefined labels linker error.


More information about the clean-list mailing list