Building a prelude

Victor Nazarov asviraspossible at gmail.com
Wed Nov 7 09:27:55 EST 2007


Is it possible to build Prelude from scratch. Or just some modules
like GHC.Base.

For example when I do
% ghcjs-inplace.bat -fglasgow-exts -fjavascript -cpp -c Err.lhs-boot
% ghcjs-inplace.bat -fglasgow-exts -fjavascript -cpp -c Base.lhs

I've got this error:

Base.lhs:94:0:
    Bad interface file: C:/Program Files/Visual Haskell\imports/GHC/Err.hi-boot
	Something is amiss; requested module  base:GHC.Err differs from name
found in the interface file main:GHC.Err

What can I do to overcome this.

Really what I want is to build some runtime system for my
ghc-derived-javascript-compiler. And to embed JavaScript integers into
it. I understand that I need to write some primitive operations in
JavaScript like addition. I can build some numerals on the top of
Haskell, but I'd like to get access to underlying javascript features
and integers is a good point to start. Can you recommend me some
strategy or smth?

-- 
vir
http://vir.comtv.ru/


More information about the Glasgow-haskell-users mailing list