Failed to run the flapjax compiler on my machine

5 views
Skip to first unread message

Wei Hu

unread,
May 12, 2009, 3:28:46 AM5/12/09
to Flapjax
I tried to run fxc on the Catch Up demo, and got this error:

fxc: src/Flapjax/HtmlEmbedding.hs:25:9-22: No instance nor default
method for class operation BrownPLT.Html.Syntax.prettyPrintScript

What's going wrong here? Thanks.

Wei Hu

unread,
May 12, 2009, 3:32:30 AM5/12/09
to Flapjax
Did I use the wrong version of WebBits library?

Artyom Shalkhakov

unread,
May 12, 2009, 5:38:06 AM5/12/09
to fla...@googlegroups.com
Hi

2009/5/12 Wei Hu <wei...@gmail.com>:


> I tried to run fxc on the Catch Up demo, and got this error:
>
> fxc: src/Flapjax/HtmlEmbedding.hs:25:9-22: No instance nor default
> method for class operation BrownPLT.Html.Syntax.prettyPrintScript

It looks like a compile-time error. What compiler and environment do
you use?

You can use the lovely "cabal install" command to spare yourself the
effort; works flawlessly fine here on Arch.

Cheers,
Artyom Shalkhakov.

Wei Hu

unread,
May 12, 2009, 11:01:40 AM5/12/09
to Flapjax


On May 12, 5:38 am, Artyom Shalkhakov <artyom.shalkha...@gmail.com>
wrote:
> Hi
>
> 2009/5/12 Wei Hu <wei....@gmail.com>:
I'm using ghc-6.10.1 on Debian. I did mean to "cabal install" flapjax,
but it's not on Hackage yet. So what I did was git clone flapjax, cd
compiler, and ran "cabal install" from that directory. There was a
warning while compiling Flapjax.HtmlEmbedding:

src/Flapjax/HtmlEmbedding.hs:25:9:
Warning: No explicit method nor default method for
`BrownPLT.Html.Syntax.prettyPrintScript'
In the instance declaration for `Script Flapjax'

I'm wondering if I ran fxc the wrong way. "fxc --help" didn't give
much helpful information.

Artyom Shalkhakov

unread,
May 12, 2009, 12:58:07 PM5/12/09
to fla...@googlegroups.com
2009/5/12 Wei Hu <wei...@gmail.com>:

> I'm using ghc-6.10.1 on Debian. I did mean to "cabal install" flapjax,
> but it's not on Hackage yet.

Oops, I meant WebBits when I said about Flapjax compiler, sorry.

> So what I did was git clone flapjax, cd
> compiler, and ran "cabal install" from that directory. There was a
> warning while compiling Flapjax.HtmlEmbedding:
>
> src/Flapjax/HtmlEmbedding.hs:25:9:
>    Warning: No explicit method nor default method for
> `BrownPLT.Html.Syntax.prettyPrintScript'
>    In the instance declaration for `Script Flapjax'

This warning says what it says. :) I suppose there's nothing wrong
with unimplemented class method if it's not used anywhere (which
seems to be the case).

Cheers,
Artyom Shalkhakov.

Wei Hu

unread,
May 12, 2009, 1:01:49 PM5/12/09
to Flapjax
Then why am I running into this error at run-time?

On May 12, 12:58 pm, Artyom Shalkhakov <artyom.shalkha...@gmail.com>
wrote:
> 2009/5/12 Wei Hu <wei....@gmail.com>:

Arjun Guha

unread,
May 12, 2009, 1:10:15 PM5/12/09
to fla...@googlegroups.com
That is definitely a compile-time warning. My runtime messages are
not nearly as descriptive.

While WebBits is on Hackage, the Flapjax compiler itself is not. I
suppose I might as well put it on Hackage.

Arjun

Arjun Guha

unread,
May 12, 2009, 1:20:45 PM5/12/09
to fla...@googlegroups.com
Since you're using Debian, this is probably the easiest way to use the compiler:

http://www.cs.brown.edu/~arjun/tmp/fxc_2.0_i386.deb

It installs to /usr/local.

Let me know how it goes.

Arjun

Wei Hu

unread,
May 12, 2009, 1:37:02 PM5/12/09
to Flapjax
I meant that was an error when *running* the fxc compiler to *compile*
a .fx file.

I'm new to flapjax, so it could well be that I didn't give fxc the
right command options, or that fxc was looking for some files but
failed.

I simply copy-pasted the Catch Up demo into a .fx file, and ran fxc on
it, which gave this error:

fxc: src/Flapjax/HtmlEmbedding.hs:25:9-22: No instance nor default
method for class operation BrownPLT.Html.Syntax.prettyPrintScript


Arjun Guha

unread,
May 12, 2009, 9:21:37 PM5/12/09
to fla...@googlegroups.com
You're right. That's a bug I introduced during some overly aggressive
re-factoring. Lesson learnt: don't re-factor.

I've pushed an update to github. If you pull and recompile, it should
work just fine.

Arjun

Reply all
Reply to author
Forward
0 new messages