[MLton] Re: [MLton-commit] r6746
Matthew Fluet
fluet at tti-c.org
Wed Aug 20 12:37:23 PDT 2008
In this instance, I don't believe that there is any difference. The MLton
sources generally use sharing constraints rather than where constraints,
so it was mostly a style issue. I think I was motivated to look for uses
of sharing/where in the sources after either:
http://mlton.org/pipermail/mlton-user/2008-February/001354.html
or
http://mlton.org/pipermail/mlton/2008-February/030188.html
I tend to find the symmetry in sharing a little more pleasing, along with
the fact that you can simultaneously share a number of types.
On Wed, 20 Aug 2008, Ville Laurikari wrote:
> Just curious, why should sharing constraints be preferred over where
> constraints? Is it simply an issue of style/consistency or am I
> missing something?
>
> On Tue, Aug 19, 2008 at 03:13:52PM -0700, Matthew Fluet wrote:
>> Use sharing constraint rather than where type constraint
>> ----------------------------------------------------------------------
>>
>> U mlton/trunk/mlton/atoms/con-.sig
>>
>> ----------------------------------------------------------------------
>>
>> Modified: mlton/trunk/mlton/atoms/con-.sig
>> ===================================================================
>> --- mlton/trunk/mlton/atoms/con-.sig 2008-08-19 22:13:46 UTC (rev 6745)
>> +++ mlton/trunk/mlton/atoms/con-.sig 2008-08-19 22:13:52 UTC (rev 6746)
>> @@ -1,4 +1,4 @@
>> -(* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
>> +(* Copyright (C) 1999-2005, 2008 Henry Cejtin, Matthew Fluet, Suresh
>> * Jagannathan, and Stephen Weeks.
>> * Copyright (C) 1997-2000 NEC Research Institute.
>> *
>> @@ -13,7 +13,8 @@
>> signature CON =
>> sig
>> include ID
>> - include PRIM_CONS where type con = t
>> + include PRIM_CONS
>> + sharing type t = con
>>
>> val fromBool: bool -> t
>> val stats: unit -> Layout.t
>>
>>
>> _______________________________________________
>> MLton-commit mailing list
>> MLton-commit at mlton.org
>> http://mlton.org/mailman/listinfo/mlton-commit
>>
>
> --
> http://www.iki.fi/vl/
>
> _______________________________________________
> MLton mailing list
> MLton at mlton.org
> http://mlton.org/mailman/listinfo/mlton
>
More information about the MLton
mailing list