
Hello glasgow-haskell-users, i've uploaded my first attempt to define Core package as http://www.haskell.org/bz/core20061003.tar.gz you should use -fno-implicit-prelude to compile it with GHC. it also compiles with Hugs, although zeroInt and other constant definitions are definitely wrong :) it's impossible to define them before fromInteger arrived! as you can see, compiler-specific definitions are very short here, much of code is in compiler-independent modules. i hope that adding yhc and jhc support should be rather simple of course, it's just proof-of-concept implementation and it shows me that Igloo was not too wrong ;) - it's really hard to define anything in absence of type classes with at least Int/Integer instances of them so now i want to try another way, that is rather like GHC.* actual implementation - define rather large Core.Base module that will contain all the base classes together with Int/Integer implementations so that all the circular dependencies will be satisfied so while my original proposal was to use Core.* modules as "equalizer" which implements the same class-less interface for all compilers (Int, eqInt, addInt...) - now i will add to Core.* implementation of base classes which will make "equalizing" a much easier (look, for example, how i implemented now divInt in Core.Int) -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

Hi Bulat,
i've uploaded my first attempt to define Core package as http://www.haskell.org/bz/core20061003.tar.gz
Cool. The one thing that worries my slightly is that HugsCore.Bool imports Prelude, and surely Prelude will end up importing HugsCore.Bool at some point? It seems that Core needs to not depend on Prelude, so that the Prelude itself can be written in a cross-compiler friendly way.
as you can see, compiler-specific definitions are very short here, much of code is in compiler-independent modules. i hope that adding yhc and jhc support should be rather simple
As soon as you have a darcs repo and can make some headway towards compiling base, the Yhc team will submit an appropriate CoreYhc. Thanks Neil

Hello Neil, Tuesday, October 3, 2006, 6:26:42 PM, you wrote:
i've uploaded my first attempt to define Core package as http://www.haskell.org/bz/core20061003.tar.gz
Cool. The one thing that worries my slightly is that HugsCore.Bool imports Prelude, and surely Prelude will end up importing HugsCore.Bool at some point? It seems that Core needs to not depend on Prelude, so that the Prelude itself can be written in a cross-compiler friendly way.
it's just a temporary hack - prim* operations returns result of type Prelude.Bool or Prelude.Ordering and i can't make anything with it unless i write the base library itself. for GHC i use the same technique for Bool - you can find in GHcCore.Bool two definitions - that will be used in final library and temporary, which imports existing Bool definition
as you can see, compiler-specific definitions are very short here, much of code is in compiler-independent modules. i hope that adding yhc and jhc support should be rather simple
As soon as you have a darcs repo and can make some headway towards compiling base, the Yhc team will submit an appropriate CoreYhc.
i will be happy to create repository, but it's only one variant of design so the other versions may have nothing common with this one but i have to say that this work will need your permanent intervention - APIs should be developed in the way that will allow to implement them in yhc. if substantial part of core library will be developed only with GHC and Hugs in mind, you will got the same problems as you have with 'base' now :) btw, can i download yhc for windows plus sources of yhc's base library? i will go to check now.. -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com
participants (2)
-
Bulat Ziganshin
-
Neil Mitchell