Dominic Steinitz wrote:
> My motivation in using this type was to see if, for example, I could
> restrict addition of a vector to another vector to vectors of the same
> length. This would be helpful in the crypto library where I end up having to
> either define new length Words all the time or us
On maandag, sep 22, 2003, at 00:07 Europe/Amsterdam, Brandon Michael
Moore wrote:
Can anyone tell me what's wrong with the following derivation?
Without going through your derivation completely, the problem is almost
certainly polymorphic recursion. Vector is a nested datatype---its
definition c
On Sun, 21 Sep 2003, Dominic Steinitz wrote:
>
> Brandon,
>
> I get the error below without the type signature. My confusion was thinking
> I needed rank-2 types. In fact I only need polymorphic recursion. Ross
> Paterson's suggestion fixes the problem. I stole Even and Odd from Chris
> Okasaki's
OTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, September 20, 2003 5:19 PM
Subject: Re: Polymorphic Recursion / Rank-2 Confusion
> On Sat, Sep 20, 2003 at 12:01:32PM +0100, Dominic Steinitz wrote:
> > Can anyone tell me why the following doesn't work (and what I have to do
to
>
<[EMAIL PROTECTED]>
To: "Dominic Steinitz" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, September 20, 2003 11:19 PM
Subject: Re: Polymorphic Recursion / Rank-2 Confusion
> Sorry about the empty message. Send /= Cancel
>
> > Can anyone tell me wh
Sorry about the empty message. Send /= Cancel
> Can anyone tell me why the following doesn't work (and what I have to do to
> fix it)? I thought by specifying the type of coalw as rank-2 would allow it
> to be used both at a and (a,b).
Frank explained why the type you gave wouldn't work. I would
On Sat, 20 Sep 2003, Ross Paterson wrote:
> On Sat, Sep 20, 2003 at 12:01:32PM +0100, Dominic Steinitz wrote:
> > Can anyone tell me why the following doesn't work (and what I have to do to
> > fix it)? I thought by specifying the type of coalw as rank-2 would allow it
> > to be used both at a and
On Sat, Sep 20, 2003 at 12:01:32PM +0100, Dominic Steinitz wrote:
> Can anyone tell me why the following doesn't work (and what I have to do to
> fix it)? I thought by specifying the type of coalw as rank-2 would allow it
> to be used both at a and (a,b).
Change the signature to
coal_ ::
On zaterdag, sep 20, 2003, at 13:01 Europe/Amsterdam, Dominic Steinitz
wrote:
Can anyone tell me why the following doesn't work (and what I have to
do to
fix it)? I thought by specifying the type of coalw as rank-2 would
allow it
to be used both at a and (a,b).
This will never work. A function
On 06-May-2001, Bernard James POPE <[EMAIL PROTECTED]> wrote:
>
> If you applied the Mercury algorithm to Haskell (ie used fixed point iteration
> to search for a type, rather than requiring a type annotation), would
> the new type inference algorithm accept/reject the same programs as the
> exi
On 03-Nov-1998, Mark P Jones <[EMAIL PROTECTED]> wrote:
> ghc doesn't need to use an iteration limit because it subjects the input
> source program to stricter limits to guarantee decidability.
The release notes for ghc 4.00 mention a new `-fallow-undecidable-instances'
option. I presume that it
On 03-Nov-1998, Michael Hanus <[EMAIL PROTECTED]> wrote:
> Fergus Henderson wrote:
> > >Is there any Haskell implementation that supports polymorphic recursion
> > > without the need of annotating the types for defined function by the
> > > programmer?
> >
> > Not as far as I know.
> >
> > H
> I don't know whether ghc uses an iteration limit mechanism --
> my guess is that it probably uses the same technique as Hugs.
No, it's an iteration limit. (When you say -fallow-undecideable-instances).
Simon
| I think Hugs 1.3c and recent versions of ghc both support undecideable
| features in their type systems -- but related to typeclasses and
| instance declarations rather than to polymorphic recursion.
|
| From email with Mark Jones, I gather that Hugs does not use an
| iteration limit mechanism,
On 02-Nov-1998, Tomasz ?ukaszewicz <[EMAIL PROTECTED]> wrote:
>Is there any Haskell implementation that supports polymorphic recursion
> without the need of annotating the types for defined function by the
> programmer?
Not as far as I know.
However, the current Mercury implementation suppor
Fergus Henderson wrote:
> >Is there any Haskell implementation that supports polymorphic recursion
> > without the need of annotating the types for defined function by the
> > programmer?
>
> Not as far as I know.
>
> However, the current Mercury implementation supports this.
This sounds in
On Thu, 6 Jan 1994, Simon L Peyton Jones wrote:
> OK, here's my example. I hope it's right. I was writing a compiler
> pass which looked at a data type something like
>
> data Expr = Let Bind Expr
> | ...
>
> data Bind = MkBind String Expr
>
> Then I had three fu
| From: Sebastian Hunt <[EMAIL PROTECTED]>
| Date: Thu, 9 Dec 1993 16:00:13 GMT
| In the interests of keeping things (ie, the haskell type system)
| as simple as possible, I would vote (if I had a vote) against this
| proposal. Unless, of course, I was persuaded that the extension was
| Really
> One modest extension we could make to the Haskell type system is
>
> to permit polymorphic recursion if
> a type signature is provided
I'm absolutely for this suggestion (especially since hbc already has
it :-). My reason for this is that it is already possible to do
this in Ha
> Dear people interested in Haskell 1.3,
Disclaimer: I'm *not* a member of any "Haskell 1.3" committee,
if any such committee has been formed.
> One modest extension we could make to the Haskell type system is
>
> to permit polymorphic recursion if
> a type signature is provided
On the Haskell mailing list Simon writes:
>PS This idea [of admitting polymorphic recursion if it's declared explicitly]
>is part of the folklore, but I don't know of a reference which
>describes it. Does anyone else? (Specifically the simple type-signature
>solution; I know there are papers ab
At 4:32 AM 10/12/93 +1300, Simon L Peyton Jones wrote:
>Dear people interested in Haskell 1.3,
Well... :-)
>One modest extension we could make to the Haskell type system is
>
>to permit polymorphic recursion if
>a type signature is provided
>
>etc.
I wouldn't have even thought
Simon's proposal seems reasonable -- I've been told that this idea is already
used in Miranda and hbc (with a command line option that I don't know) so it
certainly is feasible.
However ... as Satish has pointed out, we need to be very careful about the
interaction with overloading. In particul
> to permit polymorphic recursion if
> a type signature is provided
>
> Simon
>
> PS This idea is part of the folklore, but I don't know of a reference which
> describes it. Does anyone else? (Specifically the simple type-signature
> solution; ...)
By coincidence, I was just
> From: Simon L Peyton Jones <[EMAIL PROTECTED]>
> [...]
> The standard Hindley-Milner restriction is that a recursive function
> can only be called monomorphically in its own body. Here's an
> example (from an earlier posting to the SML list, which can't typecheck
> under this restriction.
> One modest extension we could make to the Haskell type system is
>
> to permit polymorphic recursion if
> a type signature is provided
...
> This program looks a little odd, but I can personally testify to having
> tripped over this problem in programs that I Really Wanted to wr
I support Simon's proposal to allow explicitly typed polymorphic recursion.
It is consistent with the exception to the monomorphism restriction
for explicit typings. Let's get a ruling from the type wizards that the
principle is sound, however, and from the implementors that it doesn't
seriously
27 matches
Mail list logo