Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print.hs uses dollar sign "$" which collides with jQuery #476

Open
henrylaxen opened this issue Dec 12, 2021 · 0 comments
Open

Print.hs uses dollar sign "$" which collides with jQuery #476

henrylaxen opened this issue Dec 12, 2021 · 0 comments

Comments

@henrylaxen
Copy link
Contributor

Good evening fay friends,

First I would like to say how much I appreciate the time and effort you
have put into Fay. It is such a pleasure to use it and have the Haskell
Angel looking over my shoulder when I have to write JavaScript. I
have encountered a seemingly rare and mysterious bug today. I will
write the offending lines here:


      /*******************************************************************************
       * Application code.
       */

      var $ = Fay$$$;
      var _ = Fay$$_;
      var __ = Fay$$__;

The line that is killing me is var $ = Fay$$$; Why? Because I am
using some external jQuery code, and your redefinition of the "$"
symbol causes the jQuery "$" to disappear.

This only happens when I enable --pretty-all, and I believe the line
responsible for this is line 212 in Print.hs:
`

   JsThunk             -> askIf prPrettyThunks "$" "Fay$$$"

`
I have an easy workaround, namely remove the --pretty... lines from my
Makefile, but I thought you would like to know about this in case it
bites someone else. At least if it is listed in your "Issues" others
can find it and know how to get around it.
Best wishes,
Henry Laxen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant