Hi Bulat,

Firstly, as someone who has an interest in at least 5 different
projects which either do use the base libraries, or would like to, I
think this is a great idea! Having the GHC stuff in the base, and
having a massive load of #ifdef's just means that its hard to figure
out whats going on, hard to add additional tools etc.

what is a 'base' library now? it is the library that implements common set
of operations for latest versions of ghc, hugs and nhc. it contains
low-level implementation for ghc, but relies on separate hugsbase
package for hugs (the same for nhc, afaiu). so, first step is obvious
- separate ghc-base library from the rest. hugsbase, ghc-base and
nhc-base packages should provide common set of low-level operations,
hiding from other libraries implementation details, differences
between compilers, and differences between compiler versions. they
should provide _incremental_ interfaces so that old code will continue
to work with newer compilers. eventually compiler-specific code for
stm and th should also go into these libraries but that is not the
immediate goal

then, a base library may be written against "virtual Haskell compiler",
which provides uniform set of low-level features while 'base' decorates
these features with user-friendly interfaces

Nice idea. There are a few practical issues - for example does this
virtual Haskell copmiler support higher rank types? Multi-parameter
type classes? Bang patterns? It quickly gets a lot more complicated.


- ghc-base/hugsbase/.. libs to implement _subset_ of common low-level API
Sounds like a very good idea.

- base lib to "equalize" several compilers and compiler versions,
Yes, some operations might be implemented in the base library, but
have more efficient versions in the ghc-base library. For example, map
for base should be defined the obvious way, for ghc it should be
defined with foldr. How can you accomodate this?

last line: i have some experience of writing compiler-independent code
with Haskell and C++ and believe that this plan is realistic
The differences between Haskell compilers may well be bigger than
those between C++ compilers!

I wish you the best of luck, and think this would be really nice to
hvae - unfortunately I think its unobtainable - but if we could just
get some of this goodness that would be fantastic!

Thanks

Neil
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to