Re: Some suggestion for mutually recursive modules problem.

2009-04-26 Thread Isaac Dupree
Andy Stewart wrote: Now GHC use .hs-boot fix mutually recursive modules problem, yes it can work, but it not pretty. So GHC can fix this problem automatically at next release version? Please add yourself (that is, your e-mail address) to the cc: on the corresponding bug-report, if you want

Some suggestion for mutually recursive modules problem.

2009-04-25 Thread Andy Stewart
Dear GHC developers: First thanks for your work with GHC! And i have suggestion for mutually recursive modules problem: Now GHC use .hs-boot fix mutually recursive modules problem, yes it can work, but it not pretty. So GHC can fix this problem automatically at next release version

Re: [Haskell-cafe] Mutually recursive modules and google protocol-buffers

2008-07-16 Thread Chris Kuklewicz
Thanks Roberto! Roberto Zunino wrote: Chris Kuklewicz wrote: There is no way to create a A.hs-boot file that has all of (1) Allows A.hs-boot to be compiled without compiling B.hs first (2) Allows B.hs (with a {-# SOURCE #-} pragma) to be compiled after A.hs-boot (3) Allows A.hs to

RE: [Haskell-cafe] Mutually recursive modules and google protocol-buffers

2008-07-16 Thread Sittampalam, Ganesh
Hi, module A(A) where data A deriving Show I think you should use instance Show A rather than deriving Show. All the boot file needs to do is say that the instance exists, not explain how it is constructed. Cheers, Ganesh

RE: Mutually recursive modules

2008-06-06 Thread Simon Peyton-Jones
Richard I'm assuming you have ready the GHC manual? http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html#mutual-recursion Yes, mutually recursive modules are fine (in GHC anyway), and should work as advertised there. Please do produce a test case if not. Thanks

Mutually recursive modules

2008-06-05 Thread Richard Giraud
Hello I've been doing some work with mutually recursive modules (MRMs). I'm familiar with the section in the User's Guide on how to do this and have successfully worked with MRMs with simple dependencies. However, I have created a set of MRMs that I can't seem to get to compile because

Re: Mutually recursive modules

2008-06-05 Thread Antoine Latter
On Thu, Jun 5, 2008 at 4:46 PM, Richard Giraud [EMAIL PROTECTED] wrote: Does the current {-# SOURCE #-}/.hs-boot scheme allow for compilation of arbitrary MRMs? Or are there known cases where it doesn't work? If there are cases where it doesn't work, are there other options? I don't think

Re: Mutually recursive modules

2008-06-05 Thread Isaac Dupree
Antoine Latter wrote: On Thu, Jun 5, 2008 at 4:46 PM, Richard Giraud [EMAIL PROTECTED] wrote: Does the current {-# SOURCE #-}/.hs-boot scheme allow for compilation of arbitrary MRMs? Or are there known cases where it doesn't work? If there are cases where it doesn't work, are there other

RE: Mutually recursive modules and derived instances of Data

2004-10-13 Thread Simon Peyton-Jones
| If I have two modules which are mutually recursive; | | module A where | import B | data TA = TA TB deriving (Data, Typeable) | | module B where | import A | data TB = TB TA deriving (Data, Typeable) | | How do I go about writing a hi-boot that will work in GHC? Good question. At the

Re: Mutually recursive modules and derived instances of Data

2004-10-13 Thread Martin Sjögren
On Wed, 13 Oct 2004 13:21:26 +0100, Simon Peyton-Jones [EMAIL PROTECTED] wrote: 1. Separate 'deriving' from the data type decl, so you can say derive( Data TA, Typeable TA ) anywhere. People sometimes ask for this for other reasons. 2. Allow instances in hi-boot files You might

Re: Mutually recursive modules and derived instances of Data

2004-10-13 Thread Carsten Schultz
Hi Simon! On Wed, Oct 13, 2004 at 01:21:26PM +0100, Simon Peyton-Jones wrote: Two fixes suggest themselves 1. Separate 'deriving' from the data type decl, so you can say derive( Data TA, Typeable TA ) anywhere. People sometimes ask for this for other reasons. Good thing. Plus,

Mutually recursive modules and derived instances of Data

2004-10-11 Thread Simon David Foster
Hi, If I have two modules which are mutually recursive; module A where data TA = TA String deriving (Data, Typeable) module B where data TB = TB TA deriving (Data, Typeable) How do I got about writing a hi-boot that will work in GHC? The problem is that to do proper XML Schema

RE: Compiling mutually recursive modules involving instances

2000-10-26 Thread Simon Peyton-Jones
Malaquias [mailto:[EMAIL PROTECTED]] | Sent: 24 October 2000 16:00 | To: [EMAIL PROTECTED] | Subject: Compiling mutually recursive modules involving instances | | | Hello. | | I am having difficulties in compiling mutually recursive | modules involving classes and instances in GHC 4.08.1. | Basicaly I

Re: Compiling mutually recursive modules involving instances

2000-10-26 Thread José Romildo Malaquias
shown in "Monad Transformers and Modular Interpreters", by Mark Jones and others. When I progress in that I would make some comments. The manual should really say this The manual also says a new, better, higher level way for dealing with mutually recursive modules is in the works. Is

RE: Mutually Recursive Modules and hi files

1999-07-26 Thread Simon Marlow
OK wise guys, now you've changed (incompatibly) the format of .hi files, how can I rewrite these pre-404 hi-boot files so that they work for 404? Can you summarise the changes? The main change recently was to remove the use of '!' instead of '.' to indicate that a particular identifier

Mutually Recursive Modules and hi files

1999-07-20 Thread George Russell
OK wise guys, now you've changed (incompatibly) the format of .hi files, how can I rewrite these pre-404 hi-boot files so that they work for 404? Can you summarise the changes?