Skip to content

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

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions