users@haskell.org
| Subject: Re: instance inference
|
| A patch implementing a relaxed termination constraint is at
|
| http://www.soi.city.ac.uk/~ross/instance-termination.patch
|
| Here is the description:
|
| With -fglasgow-exts but not -fallow-undecidable-instances, GHC 6.4
| requires
On Mon, Feb 06, 2006 at 05:49:42PM +0300, Bulat Ziganshin wrote:
> one question - will be the same rules incorporated in Hugs? as you
> know, i'm trying to made Hugs+GHC compatible library, so this matters
Hugs does not attempt to restrict instances to enforce termination --
it just makes context
Hello Ross,
Monday, February 06, 2006, 2:35:40 PM, you wrote:
RP> A patch implementing a relaxed termination constraint is at
RP> http://www.soi.city.ac.uk/~ross/instance-termination.patch
[this patch provides the following:]
RP> With -fglasgow-exts but not -fallow-undecidable-instance
| I have not followed this completely, but do these new rules now allow:
|
| class F a b c where
|f: a -> b -> c
|
| instance F a a a where
Ross's proposal would allow that.
Ignore functional dependencies for the moment. To force instance
inference to terminate we need the con
On Mon, Feb 06, 2006 at 01:53:17PM +0100, Doaitse Swierstra wrote:
> I have not followed this completely, but do these new rules now allow:
>
> class F a b c where
> f: a -> b -> c
>
> and then
>
> instance F a a a where
Yes. Indeed they allow any unconstrained instance. They would
also all
I have not followed this completely, but do these new rules now allow:
class F a b c where
f: a -> b -> c
and then
instance F a a a where
...
which gives currenly gives (using -fglasgow-exts):
Test.hs:6:0:
Illegal instance declaration for `F a a a'
(There must be at least one
| > Yes, (1-GHC) certainly contradicts the FD paper that Martin and I
wrote.
| > I think (1) should be:
| >
| >(1-fixed) Each assertion in the context must constrain type
| > variables, and
| >those type variables must all be mentioned in the head.
| >
| > That is, there is no requirement t
On Mon, Feb 06, 2006 at 12:07:54PM +, Ross Paterson wrote:
> On Mon, Feb 06, 2006 at 11:53:17AM -, Simon Peyton-Jones wrote:
> > Your (1-Ross) ensures that every variable in the assertion does occur in
> > the head. But I'm not sure that the size-reduction argument is
> > watertight in the
On Mon, Feb 06, 2006 at 11:53:17AM -, Simon Peyton-Jones wrote:
> Thanks! But I'm not certain that your fix is correct. Let's ask
> Martin. I've added comments below.
>
> [...]
>
> Yes, (1-GHC) certainly contradicts the FD paper that Martin and I wrote.
> I think (1) should be:
>
>(1-
:36
| To: Simon Peyton-Jones; glasgow-haskell-users@haskell.org
| Subject: Re: instance inference
|
| A patch implementing a relaxed termination constraint is at
|
| http://www.soi.city.ac.uk/~ross/instance-termination.patch
|
| Here is the description:
|
| With -fglasgow-exts but not -fal
A patch implementing a relaxed termination constraint is at
http://www.soi.city.ac.uk/~ross/instance-termination.patch
Here is the description:
With -fglasgow-exts but not -fallow-undecidable-instances, GHC 6.4
requires that instances be of the following form:
(1) each assertion in
> | As a termination test, how about no restrictions on context and head
> | except:
> |
> |Each assertion in the context must satisfy
> | * the variables of the assertion are a sub-multiset of those of
> the
> | head (though they may be the same), and
> | * the assertion has fe
users@haskell.org
| Subject: Re: instance inference
|
| As a termination test, how about no restrictions on context and head
| except:
|
|Each assertion in the context must satisfy
| * the variables of the assertion are a sub-multiset of those of
the
| head (though they may be the same)
As a termination test, how about no restrictions on context and head
except:
Each assertion in the context must satisfy
* the variables of the assertion are a sub-multiset of those of the
head (though they may be the same), and
* the assertion has fewer type constructors and varia
On Mon, Dec 12, 2005 at 03:38:18PM -, Simon Peyton-Jones wrote:
> Interesting example. Yes, GHC builds recursive dictionaries these days.
> There's a bit of discussion in our SYB paper in ICFP'05.
> http://research.microsoft.com/%7Esimonpj/papers/hmap/ And Martin
> Sulzmann has a whole
ot;Co-induction...")
Simon
| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:glasgow-haskell-users-
| [EMAIL PROTECTED] On Behalf Of Ross Paterson
| Sent: 12 December 2005 10:46
| To: glasgow-haskell-users@haskell.org
| Subject: instance inference
|
| I'm puzzled that the f
I'm puzzled that the following is accepted. Is some sort of greatest
fixed point computation used for instances?
{-# OPTIONS_GHC -fglasgow-exts #-}
module M where
class C a b where c :: a -> b -> Bool
instance C b b => C (Maybe a) b where c x y = c y y
f :: Maybe a -> Bool
f x = c x x
___
17 matches
Mail list logo