haskell-cafe@haskell.org
[Top] [All Lists]

Re: [Haskell-cafe] Polymorphic (typeclass) values in a list?

Subject: Re: [Haskell-cafe] Polymorphic (typeclass) values in a list?
From: "Brandon S. Allbery KF8NH"
Date: Fri, 19 Oct 2007 12:31:01 -0400

On Oct 19, 2007, at 12:11 , Sebastian Sylvan wrote:

On 19/10/2007, Kalman Noel <kalman.noel@xxxxxxxxxxxxxx> wrote:

   data ExistsNumber = forall a. Num a => Number a

I'm without a Haskell compiler, but shouldn't that be "exists a."?

The problem is that "exists" is not valid in either Haskell 98 or any current extension, whereas "forall" is a very common extension. But you can simulate "exists" via "forall", which is the thrust of these approaches.

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@xxxxxxxxx
system administrator [openafs,heimdal,too many hats] allbery@xxxxxxxxxxx
electrical and computer engineering, carnegie mellon university    KF8NH


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>