RE: deriving Typeable

2004-06-03 Thread Simon Peyton-Jones
You can just write the instance of Typeable by hand
instance Typeable1 e = Typeable (Y e) where ...

(Use the instances in the library as a guide.)

Yes, GHC could do this for you, but it would then stumble when e had kind ((*-*) - 
*).  We need kind polymorphism!

Simon

| -Original Message-
| From: [EMAIL PROTECTED] [mailto:glasgow-haskell-users-
| [EMAIL PROTECTED] On Behalf Of John Meacham
| Sent: 02 June 2004 21:53
| To: [EMAIL PROTECTED]
| Subject: deriving Typeable
| 
| newtype Y e = Y { unY :: (e (Y e)) }
| deriving(Data,Typeable,Show,Read,Eq)
| 
| gives
| E.hs:64:
| Can't make a derived instance of `Typeable (Y e)'
| (`Y' is parameterised over arguments of kind other than `*')
| When deriving instances for type `Y'
| 
| Is there any way around this limitation other than manually expanding Y
| everywhere I want to use it (which I really don't want to do)? Is the
| limitation inherent to the way Typeable works, or is it just that no one
| has implemented it yet?
| 
| --
| John Meacham - repetae.netjohn
| ___
| Glasgow-haskell-users mailing list
| [EMAIL PROTECTED]
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: F#

2004-06-03 Thread Ashley Yakeley
In article [EMAIL PROTECTED],
 Manuel M T Chakravarty [EMAIL PROTECTED] wrote:

 Generally, phrases such as XYZ is excellent within certain niches
 sounds like cheap propaganda to me.  If you replace Haskell by Linux, I
 am sure you'll find similar statements on other Microsoft web pages ;-)

Doubtless. I think if they're casting about for excuses not to use 
Haskell, they're unlucky not to have hit on time/space issues. Anyway, 
I've rewritten it for them:

Purely functional languages like Haskell are excellent to write
in, but non-trivial work is involved with implementing a lazy
language in a strict run-time environment. ...

-- 
Ashley Yakeley, Seattle WA

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Parallel

2004-06-03 Thread Goran Topic
Hello.

I am a newcomer to functional programming, and I would like to learn it
very much. However, I'm also starting to deal with parallel programming,
and I thought I'd combine my two interests.

So I grabbed the Debian ghc6 package (v6.2), and (after a lot of
searching) found out that I lack the mp way. Then I tried grabbing the
sources, and compiling them with WAYS=mp, but when the compiler is
compiling the mp way, it does so with the -parallel switch, which
requires the mp include files - the very ones I am trying to compile!

Now, several people tried telling me that GpH is a separate project, but
1) it's very out of date
2) ghc source has a ton of PVM references
3) the ghc user manual mentions parallel code
...so I kind of figured that GpH got integrated into ghc. The problem is
that I just can't get it to run!

Can anyone tell me what I am doing wrong?

Goran Topic
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users