RE: linking problems after switching from GHC5 to GHC6

2004-02-02 Thread Simon Marlow
Thanks; looks like I overlooked that patch.

One workaround is to use '-lfoo' rather than 'foo.a' (not forgetting to
add the lib directory with -Ldir if necessary).

Cheers,
Simon 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Sigbjorn Finne
 Sent: 30 January 2004 16:39
 To: [EMAIL PROTECTED]
 Subject: Re: linking problems after switching from GHC5 to GHC6
 
 This is a 6.x bug; I fixed it in HEAD a while back,
 
 http://haskell.org/pipermail/cvs-ghc/2003-October/018991.html
 
 but the change wasn't merged for some reason.
 
 --sigbjorn
 
 - Original Message - 
 From: Sven Panne [EMAIL PROTECTED]
 To: Volker Wysk [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, January 30, 2004 08:28
 Subject: Re: linking problems after switching from GHC5 to GHC6
 
 
  Volker Wysk wrote:
   I've put together a minimal program which reproduces the 
 problem. Save
 the
   three attachments in a new directroy and type make. I'ts just as
   described earlier. The trivial program compiles with 
 GHC5, but not GHC6.
 [...]
 
  Hmmm, it looks like GHC is reversing the order of files in 
 the linking
 step.
  Mentioning liba.a *before* Main.o in the linking step is a 
 workaround...
 
  Cheers,
  S.
 
 
  ___
  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
 
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: Generics and type classes

2004-02-02 Thread Simon Peyton-Jones
What you ask is not easy.  When you ask for
everywhere special
you ask to apply special to each node of the tree -- and special
requires the MyClass dictionary.  But the library code for 'gmapT' and
'everywhere' don't know about MyClass.  In particular, to do (gmapT
special), poor old gmapT has to find a MyClass dictionary to pass to
each call to special -- and it has no way to do that. 

I bet that you could do what you want by replacing the 'instance MyClass
ExampleType1' by mkTs for special, so special uses run-time type
dispatch to implement the operations in MyClass.  I guess that's what
Keeane is suggesting.

Simon

| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:glasgow-haskell-users-
| [EMAIL PROTECTED] On Behalf Of MR K P SCHUPKE
| Sent: 02 February 2004 11:48
| To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
| Subject: Re: Generics and type classes
| 
| Because the 'cast' operator used in generics, works on having a
concrete
| type to cast to. What you need to do is:
| 
| module TypeTest where
| 
| import Data.Generics
| 
| class Data a = MyClass a
| 
| instance MyClass ExampleType1
| instance MyClass ExampleType2
| 
| special :: ExampleType1 - ExampleType1
| special = ...
| 
| special2 :: ExampleType2 - ExampleType2
| special2 = ...
| 
| generic :: MyClass a = a - a
| generic = everywhere (mkT special `extT` special2 ...)
| 
|   Regards,
|   Keean.
| ___
| 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


ghc6.2 on Solaris

2004-02-02 Thread George Russell
I have produced, with Simon M's help, an unofficial binary release of ghc 6.2 on
Solaris.  This may be downloaded from
   http://www.informatik.uni-bremen.de/~ger/ghc/

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