[Yhc] Re: Javascript backend fixed to compile with new Core Types

David Fox ddssff at gmail.com
Sat Jun 2 18:39:05 EDT 2007


Aha!  My build procedure has a flaw.  After I build the new compiler I go
into src/translator/js and build there, but the Makefile in there uses the
old compiler.  I had to add YHC=$(CURDIR)/inst/yh
YHC_BASE_PATH=$(CURDIR)/inst to the make arguments.

On 6/2/07, David Fox <ddssff at gmail.com> wrote:
>
> I'm pretty sure it is related to the UnsafeJS.ycr file produced by the new
> compiler.  I did an strace and the error occurred right after reading
> /usr/lib/haskell/UnsafeJS.ycr, which was built during the build of the new
> compiler.  When I copy UnsafeJS.hs into my working directory and compile,
> the crash comes right after reading the just compiled local file
> ./UnsafeJS.ycr.
>
> On 6/2/07, Neil Mitchell <ndmitchell at gmail.com> wrote:
> >
> > Hi David,
> >
> > As a first shot, try deleting any .ycr and .yca files you have sitting
> > around - the format changed recently which can result in these invalid
> > binary data messages.
> >
> > Thanks
> >
> > Neil
> >
> >
> > On 6/2/07, David Fox <ddssff at gmail.com> wrote:
> > > I am getting this error when I try to import UnsafeJS into a program:
> > >
> > >  $ make EchoCPS.html
> > > yhc -includes /usr/lib/haskell -linkcore EchoCPS.hs
> > > Compiling UnsafeJS         ( UnsafeJS.hs )
> > > Warning: foreign import/export has non-primitive type: Prelude.[]
> > >
> > > Compiling DOM.Level1.Dom   (
> > > ../../../../usr/lib/haskell/DOM/Level1/Dom.hs )
> > > Compiling DOM.Level1.Document (
> > > ../../../../usr/lib/haskell/DOM/Level1/Document.hs )
> > > Compiling DOM.Level1.Html  (
> > > ../../../../usr/lib/haskell/DOM/Level1/Html.hs )
> > > Compiling DOM.Level1.HTMLDivElement (
> > > ../../../../usr/lib/haskell/DOM/Level1/HTMLDivElement.hs )
> > > Compiling DOM.Level1.HTMLInputElement (
> > > ../../../../usr/lib/haskell/DOM/Level1/HTMLInputElement.hs
> > > )
> > > Compiling DOM.Level1.HTMLElement (
> > > ../../../../usr/lib/haskell/DOM/Level1/HTMLElement.hs )
> > > Compiling CDOM.Level1.Events (
> > > ../../../../usr/lib/haskell/CDOM/Level1/Events.hs )
> > > Compiling DOM.Level1.HTMLDocument (
> > > ../../../../usr/lib/haskell/DOM/Level1/HTMLDocument.hs )
> > > Compiling DOM.Level1.Node  (
> > > ../../../../usr/lib/haskell/DOM/Level1/Node.hs )
> > > Compiling CDOM.Level1.DomUtils (
> > > ../../../../usr/lib/haskell/CDOM/Level1/DomUtils.hs )
> > > Compiling Roman            ( Roman.hs )
> > > Compiling Debug.Profiling  (
> > > ../../../../usr/lib/haskell/Debug/Profiling.hs )
> > > Compiling EchoCPS          ( EchoCPS.hs )
> > > yhc: user error (invalid binary data found)
> > >
> > > make: *** [ EchoCPS.html] Error 1
> > >
> > >
> > >
> > >  On 5/25/07, Dimitry Golubovsky <golubovsky at gmail.com> wrote:
> > > > Hi,
> > > >
> > > > I have fixed the Javascript backend to accomodate the new type
> > layout
> > > > in Core (primitives and functions got an unified type).
> > > >
> > > > Changes have been pushed to the repo. No new functionality was
> > added.
> > > > At least this demo program:
> > > >
> > > > http://www.golubovsky.org/repos/hibb/EchoCPS.hs
> > > >
> > > > compiles to this web page:
> > > >
> > > > http://www.golubovsky.org/repos/hibb/EchoCPS.html
> > > >
> > > > Those who experiment with the Javascript backend please try
> > compiling
> > > > your programs and let me know if anything went broke.
> > > >
> > > > Thanks.
> > > >
> > > > --
> > > > Dimitry Golubovsky
> > > >
> > > > Anywhere on the Web
> > > >
> > >
> > >
> > > _______________________________________________
> > > Yhc mailing list
> > > Yhc at haskell.org
> > > http://www.haskell.org/mailman/listinfo/yhc
> > >
> > >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/yhc/attachments/20070602/ac4fb5ab/attachment.htm


More information about the Yhc mailing list