[m-rev.] diff: fundeps, polymorphic instances

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Oct 30 12:13:21 AEDT 2006


On Mon, 30 Oct 2006, Mark Brown wrote:

> Index: NEWS
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/NEWS,v
> retrieving revision 1.427
> diff -u -r1.427 NEWS
> --- NEWS	12 Oct 2006 06:30:16 -0000	1.427
> +++ NEWS	30 Oct 2006 00:56:05 -0000
> @@ -3,6 +3,8 @@
>
> Changes to the Mercury language:
>
> +* Some of the restrictions on typeclass instances have been relaxed, allowing
> +  support for polymorphic instances with functional dependencies.
> * We now support trace goals, which can be used to print progress messages or
>   log messages in the middle of arbitrary computations.
> * Mutables can now be marked as constant, which is useful when working with
> @@ -44,6 +46,23 @@
>
> Changes to the Mercury language:
>
> +* The restriction on typeclass instances that all type variables appearing in
> +  the range of a functional dependency must be monomorphic has been relaxed.
> +  We now support cases where the type variables in the range are determined
> +  by the type variables in the domain, using the functional dependency
> +  information from any instance constraints.
> +
> +  For example, given the typeclass
> +
> +	:- typeclass foo(A, B) <= (A -> B).
> +
> +  the following instance is now valid:
> +
> +	:- instance foo(list(S), list(T)) <= foo(S, T).
> +
> +  since the variable T, in the range, is determined from the variable S by the
> +  functional dependencies on the foo(S, T) constraint.
> +
> * A new language construct allows programmers to include debugging and/or
>   logging code in the middle of arbitrary computations. Trace goals
>   may have both compile time and run time conditions placed on their execution.

That looks fine.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list