| there is no need to use such hacks. it is not dificult to add suport | for mutually recursive modules to an implementation directly. | unfortunatley none of the working haskell implementations support | recursive modules, Simple in principle, not so simple in practice. If it was easy to make GHC do mutually recursive modules we'd do it right away. It's certainly possible but it's real work, and .hi-boot files, while clunky, do the job. S
hi, i can't really argue with simon he is the real compiler expert. and i am not familiar with the inner workings of GHC, so my argument is even weaker. and in any case discussions on the haskell mailing list very rarely have any effect except for their entertainment value during boring meetings... so if you are sitting bored somewhere read on :-) in my defence, we do have recursive modules implemented in our front end, and it can do type checking (which is presumably where the difficulties with recursive modules arise). and implementing the recursive modules was definitely not the hardest part to get working. .hi-boot files indeed do the job. so do seq, the monomorphism restriction, defaulting and unsafePerformIO. it is just that they don't do the job very well. i am curious however, what is difficult about implementing recursive modules (that is, if it can be explained without getting into the technical details of GHC). bye iavor Simon Peyton-Jones wrote:
| there is no need to use such hacks. it is not dificult to add suport | for mutually recursive modules to an implementation directly. | unfortunatley none of the working haskell implementations support | recursive modules,
Simple in principle, not so simple in practice. If it was easy to make GHC do mutually recursive modules we'd do it right away. It's certainly possible but it's real work, and .hi-boot files, while clunky, do the job.
S
-- ================================================== | Iavor S. Diatchki, Ph.D. student | | Department of Computer Science and Engineering | | School of OGI at OHSU | | http://www.cse.ogi.edu/~diatchki | ==================================================
On 17-Mar-2003 Simon Peyton-Jones wrote:
| there is no need to use such hacks. it is not dificult to add suport | for mutually recursive modules to an implementation directly. | unfortunatley none of the working haskell implementations support | recursive modules,
Simple in principle, not so simple in practice. If it was easy to make GHC do mutually recursive modules we'd do it right away. It's certainly possible but it's real work, and .hi-boot files, while clunky, do the job.
My original posting was partly aimed at Hugs, since I find it very convenient to use Hugs during development, though I finally compile the stuff with ghc. A Haskell-toHaskell precompiler would solve the problem for both Hugs and ghc. And I wasn't sure from my first look into the manual that hi-boot-Files are actually a feasible solution for mutual recursion at a greater scale. But since you both find hi-modules feasible, I'll try out them in the next version. Elke. -- Elke Kasimir EsPresto AG ----------------------------------------------------------------- - Software Development- Breite Str. 30-31 Tel/Fax: +49-30-90 226-750/-760 10178 Berlin/Germany
participants (3)
-
Elke Kasimir -
Iavor S. Diatchki -
Simon Peyton-Jones