diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/README.md b/README.md
new file mode 100644
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+please read my diploma thesis 2015 (TU Vienna)
+Haskell OpenLayers Wrapper
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,3 @@
+import Distribution.Simple
+
+main = defaultMain
diff --git a/olwrapper.cabal b/olwrapper.cabal
new file mode 100644
--- /dev/null
+++ b/olwrapper.cabal
@@ -0,0 +1,72 @@
+Name:           olwrapper
+Version:        0.3.7
+Synopsis:       An OpenLayers JavaScript Wrapper and Webframework with snaplet-fay
+Description:    test
+Author:         Thomas Edelmann
+Maintainer:     tomnobleman@gmail.com
+Stability:      Experimental
+Category:       Web, Map, OpenLayers, Webframework, snaplet-fay, Wrapper
+Build-type:     Simple
+Cabal-version:  >=1.12
+license:        GPL
+license-file:   LICENSE
+
+Flag development
+  Description:  Whether to build the server in development (interpreted) mode
+  Default:      False
+
+library
+  hs-source-dirs:      wrapper, web
+  default-language:    Haskell2010
+  exposed-modules:
+    OpenLayers
+    OpenLayers.Func
+    OpenLayers.Html
+    OpenLayers.Types
+    OlApp
+  other-modules:
+    OpenLayers.HtmlInternal
+    Tutorial.OlApp
+    Tutorial.Traffic
+  other-extensions:    
+  build-depends:       
+    fay-base                  == 0.19.4.1  ,
+    fay-text                  == 0.3.2     ,
+    fay-jquery                == 0.6.0.2   
+
+executable olwrapper
+  hs-source-dirs:      src, snaplets/fay/src
+  main-is:             Main.hs
+  default-language:    Haskell2010
+  build-depends:   
+    base                      >= 4 && < 4.8,
+    bytestring                >= 0.10      ,
+    lens                      == 4.4.0.2   ,
+    mtl                       >= 2         ,
+    text                      >= 0.11      ,
+    fay                       == 0.21.2    ,
+    fay-text                  == 0.3.2     ,
+    fay-jquery                == 0.6.0.2   ,
+    snap                      == 0.13.3.1  ,
+    snap-core                 == 0.9.6.3   ,
+    snap-server               == 0.9.4.5   ,
+    snaplet-fay               >= 0.3       ,
+    snap-loader-static        == 0.9.0.2
+
+  if flag(development)
+    build-depends:  snap-loader-dynamic == 0.10.0.2
+    cpp-options:    -DDEVELOPMENT
+    ghc-options:    -threaded -w -Wall
+  else
+    if impl(ghc >= 6.12.0)
+      ghc-options:  
+                   -threaded -Wall -fwarn-tabs -funbox-strict-fields
+                   -fno-warn-orphans -fno-warn-unused-do-bind
+    else
+      ghc-options:  
+                   -threaded -Wall -fwarn-tabs -funbox-strict-fields
+                   -fno-warn-orphans
+
+source-repository head
+  type:       git
+  location:   https://github.com/olwrapper/olwrapper.git
diff --git a/snaplets/fay/devel.cfg b/snaplets/fay/devel.cfg
new file mode 100644
--- /dev/null
+++ b/snaplets/fay/devel.cfg
@@ -0,0 +1,24 @@
+# "Development": Compile files on every request.
+# "Production":  Compile all files in snaplets/src/fay when the application is started and then serve them statically.
+#
+# Both methods will write files to disk for debugging purposes.
+# Default is "Development".
+compileMode = "Development"
+# Print more or less information about what the snaplet is doing.
+# Default is on.
+verbose = on
+# Run js-beautify on the results if it is available in the PATH.
+# If it isn't available the compiled file will be used as is.
+# Default is on.
+prettyPrint = on
+# A comma-separated list of directories to look for fay imports in.
+# This is useful if you want to share modules between Fay and Snap.
+# Paths are relative to the root of the snap application.
+# snaplets/fay/src will always be checked for imports.
+# Default is "" meaning no additional directories will be checked.
+includeDirs = "wrapper,web"
+# A comma separated list of Fay package names.
+# This gives the same result as using includeDirs,
+# except Fay figures out the paths for you.
+# Default is "" meaning no other Fay packages will be used.
+packages = "fay-text,fay-jquery"
diff --git a/snaplets/fay/js/Index.js b/snaplets/fay/js/Index.js
new file mode 100644
--- /dev/null
+++ b/snaplets/fay/js/Index.js
@@ -0,0 +1,6861 @@
+/*******************************************************************************
+ * Misc.
+ */
+
+// Workaround for missing functionality in IE 8 and earlier.
+if( Object.create === undefined ) {
+  Object.create = function( o ) {
+    function F(){}
+    F.prototype = o;
+    return new F();
+  };
+}
+
+// Insert properties of b in place into a.
+function Fay$$objConcat(a,b){
+  for (var p in b) if (b.hasOwnProperty(p)){
+    a[p] = b[p];
+  }
+  return a;
+}
+
+/*******************************************************************************
+ * Thunks.
+ */
+
+// Force a thunk (if it is a thunk) until WHNF.
+function Fay$$_(thunkish,nocache){
+  while (thunkish instanceof Fay$$$) {
+    thunkish = thunkish.force(nocache);
+  }
+  return thunkish;
+}
+
+// Apply a function to arguments (see method2 in Fay.hs).
+function Fay$$__(){
+  var f = arguments[0];
+  for (var i = 1, len = arguments.length; i < len; i++) {
+    f = (f instanceof Fay$$$? Fay$$_(f) : f)(arguments[i]);
+  }
+  return f;
+}
+
+// Thunk object.
+function Fay$$$(value){
+  this.forced = false;
+  this.value = value;
+}
+
+// Force the thunk.
+Fay$$$.prototype.force = function(nocache) {
+  return nocache ?
+    this.value() :
+    (this.forced ?
+     this.value :
+     (this.value = this.value(), this.forced = true, this.value));
+};
+
+
+function Fay$$seq(x) {
+  return function(y) {
+    Fay$$_(x,false);
+    return y;
+  }
+}
+
+function Fay$$seq$36$uncurried(x,y) {
+  Fay$$_(x,false);
+  return y;
+}
+
+/*******************************************************************************
+ * Monad.
+ */
+
+function Fay$$Monad(value){
+  this.value = value;
+}
+
+// This is used directly from Fay, but can be rebound or shadowed. See primOps in Types.hs.
+// >>
+function Fay$$then(a){
+  return function(b){
+    return Fay$$bind(a)(function(_){
+      return b;
+    });
+  };
+}
+
+// This is used directly from Fay, but can be rebound or shadowed. See primOps in Types.hs.
+// >>
+function Fay$$then$36$uncurried(a,b){
+  return Fay$$bind$36$uncurried(a,function(_){ return b; });
+}
+
+// >>=
+// This is used directly from Fay, but can be rebound or shadowed. See primOps in Types.hs.
+function Fay$$bind(m){
+  return function(f){
+    return new Fay$$$(function(){
+      var monad = Fay$$_(m,true);
+      return Fay$$_(f)(monad.value);
+    });
+  };
+}
+
+// >>=
+// This is used directly from Fay, but can be rebound or shadowed. See primOps in Types.hs.
+function Fay$$bind$36$uncurried(m,f){
+  return new Fay$$$(function(){
+    var monad = Fay$$_(m,true);
+    return Fay$$_(f)(monad.value);
+  });
+}
+
+// This is used directly from Fay, but can be rebound or shadowed.
+function Fay$$$_return(a){
+  return new Fay$$Monad(a);
+}
+
+// Allow the programmer to access thunk forcing directly.
+function Fay$$force(thunk){
+  return function(type){
+    return new Fay$$$(function(){
+      Fay$$_(thunk,type);
+      return new Fay$$Monad(Fay$$unit);
+    })
+  }
+}
+
+// This is used directly from Fay, but can be rebound or shadowed.
+function Fay$$return$36$uncurried(a){
+  return new Fay$$Monad(a);
+}
+
+// Unit: ().
+var Fay$$unit = null;
+
+/*******************************************************************************
+ * Serialization.
+ * Fay <-> JS. Should be bijective.
+ */
+
+// Serialize a Fay object to JS.
+function Fay$$fayToJs(type,fayObj){
+  var base = type[0];
+  var args = type[1];
+  var jsObj;
+  if(base == "action") {
+    // A nullary monadic action. Should become a nullary JS function.
+    // Fay () -> function(){ return ... }
+    return function(){
+      return Fay$$fayToJs(args[0],Fay$$_(fayObj,true).value);
+    };
+
+  }
+  else if(base == "function") {
+    // A proper function.
+    return function(){
+      var fayFunc = fayObj;
+      var return_type = args[args.length-1];
+      var len = args.length;
+      // If some arguments.
+      if (len > 1) {
+        // Apply to all the arguments.
+        fayFunc = Fay$$_(fayFunc,true);
+        // TODO: Perhaps we should throw an error when JS
+        // passes more arguments than Haskell accepts.
+
+        // Unserialize the JS values to Fay for the Fay callback.
+        if (args == "automatic_function")
+        {
+          for (var i = 0; i < arguments.length; i++) {
+            fayFunc = Fay$$fayToJs(["automatic"], Fay$$_(fayFunc(Fay$$jsToFay(["automatic"],arguments[i])),true));
+          }
+          return fayFunc;
+        }
+
+        for (var i = 0, len = len; i < len - 1 && fayFunc instanceof Function; i++) {
+          fayFunc = Fay$$_(fayFunc(Fay$$jsToFay(args[i],arguments[i])),true);
+        }
+        // Finally, serialize the Fay return value back to JS.
+        var return_base = return_type[0];
+        var return_args = return_type[1];
+        // If it's a monadic return value, get the value instead.
+        if(return_base == "action") {
+          return Fay$$fayToJs(return_args[0],fayFunc.value);
+        }
+        // Otherwise just serialize the value direct.
+        else {
+          return Fay$$fayToJs(return_type,fayFunc);
+        }
+      } else {
+        throw new Error("Nullary function?");
+      }
+    };
+
+  }
+  else if(base == "string") {
+    return Fay$$fayToJs_string(fayObj);
+  }
+  else if(base == "list") {
+    // Serialize Fay list to JavaScript array.
+    var arr = [];
+    fayObj = Fay$$_(fayObj);
+    while(fayObj instanceof Fay$$Cons) {
+      arr.push(Fay$$fayToJs(args[0],fayObj.car));
+      fayObj = Fay$$_(fayObj.cdr);
+    }
+    return arr;
+  }
+  else if(base == "tuple") {
+    // Serialize Fay tuple to JavaScript array.
+    var arr = [];
+    fayObj = Fay$$_(fayObj);
+    var i = 0;
+    while(fayObj instanceof Fay$$Cons) {
+      arr.push(Fay$$fayToJs(args[i++],fayObj.car));
+      fayObj = Fay$$_(fayObj.cdr);
+    }
+    return arr;
+  }
+  else if(base == "defined") {
+    fayObj = Fay$$_(fayObj);
+    return fayObj instanceof Fay.FFI._Undefined
+      ? undefined
+      : Fay$$fayToJs(args[0],fayObj.slot1);
+  }
+  else if(base == "nullable") {
+    fayObj = Fay$$_(fayObj);
+    return fayObj instanceof Fay.FFI._Null
+      ? null
+      : Fay$$fayToJs(args[0],fayObj.slot1);
+  }
+  else if(base == "double" || base == "int" || base == "bool") {
+    // Bools are unboxed.
+    return Fay$$_(fayObj);
+  }
+  else if(base == "ptr" || base == "unknown")
+    return fayObj;
+  else if(base == "automatic" && fayObj instanceof Function) {
+    return Fay$$fayToJs(["function", "automatic_function"], fayObj);
+  }
+  else if(base == "automatic" || base == "user") {
+    fayObj = Fay$$_(fayObj);
+
+    if(fayObj instanceof Fay$$Cons || fayObj === null){
+      // Serialize Fay list to JavaScript array.
+      var arr = [];
+      while(fayObj instanceof Fay$$Cons) {
+        arr.push(Fay$$fayToJs(["automatic"],fayObj.car));
+        fayObj = Fay$$_(fayObj.cdr);
+      }
+      return arr;
+    } else {
+      var fayToJsFun = fayObj && fayObj.instance && Fay$$fayToJsHash[fayObj.instance];
+      return fayToJsFun ? fayToJsFun(type,type[2],fayObj) : fayObj;
+    }
+  }
+
+  throw new Error("Unhandled Fay->JS translation type: " + base);
+}
+
+// Stores the mappings from fay types to js objects.
+// This will be populated by compiled modules.
+var Fay$$fayToJsHash = {};
+
+// Specialized serializer for string.
+function Fay$$fayToJs_string(fayObj){
+  // Serialize Fay string to JavaScript string.
+  var str = "";
+  fayObj = Fay$$_(fayObj);
+  while(fayObj instanceof Fay$$Cons) {
+    str += Fay$$_(fayObj.car);
+    fayObj = Fay$$_(fayObj.cdr);
+  }
+  return str;
+};
+function Fay$$jsToFay_string(x){
+  return Fay$$list(x)
+};
+
+// Special num/bool serializers.
+function Fay$$jsToFay_int(x){return x;}
+function Fay$$jsToFay_double(x){return x;}
+function Fay$$jsToFay_bool(x){return x;}
+
+function Fay$$fayToJs_int(x){return Fay$$_(x);}
+function Fay$$fayToJs_double(x){return Fay$$_(x);}
+function Fay$$fayToJs_bool(x){return Fay$$_(x);}
+
+// Unserialize an object from JS to Fay.
+function Fay$$jsToFay(type,jsObj){
+  var base = type[0];
+  var args = type[1];
+  var fayObj;
+  if(base == "action") {
+    // Unserialize a "monadic" JavaScript return value into a monadic value.
+    return new Fay$$Monad(Fay$$jsToFay(args[0],jsObj));
+  }
+  else if(base == "function") {
+    // Unserialize a function from JavaScript to a function that Fay can call.
+    // So
+    //
+    //    var f = function(x,y,z){ … }
+    //
+    // becomes something like:
+    //
+    //    function(x){
+    //      return function(y){
+    //        return function(z){
+    //          return new Fay$$$(function(){
+    //            return Fay$$jsToFay(f(Fay$$fayTojs(x),
+    //                                  Fay$$fayTojs(y),
+    //                                  Fay$$fayTojs(z))
+    //    }}}}};
+    var returnType = args[args.length-1];
+    var funArgs = args.slice(0,-1);
+
+    if (jsObj.length > 0) {
+      var makePartial = function(args){
+        return function(arg){
+          var i = args.length;
+          var fayArg = Fay$$fayToJs(funArgs[i],arg);
+          var newArgs = args.concat([fayArg]);
+          if(newArgs.length == funArgs.length) {
+            return new Fay$$$(function(){
+              return Fay$$jsToFay(returnType,jsObj.apply(this,newArgs));
+            });
+          } else {
+            return makePartial(newArgs);
+          }
+        };
+      };
+      return makePartial([]);
+    }
+    else
+      return function (arg) {
+        return Fay$$jsToFay(["automatic"], jsObj(Fay$$fayToJs(["automatic"], arg)));
+      };
+  }
+  else if(base == "string") {
+    // Unserialize a JS string into Fay list (String).
+    // This is a special case, when String is explicit in the type signature,
+    // with `Automatic' a string would not be decoded.
+    return Fay$$list(jsObj);
+  }
+  else if(base == "list") {
+    // Unserialize a JS array into a Fay list ([a]).
+    var serializedList = [];
+    for (var i = 0, len = jsObj.length; i < len; i++) {
+      // Unserialize each JS value into a Fay value, too.
+      serializedList.push(Fay$$jsToFay(args[0],jsObj[i]));
+    }
+    // Pop it all in a Fay list.
+    return Fay$$list(serializedList);
+  }
+  else if(base == "tuple") {
+    // Unserialize a JS array into a Fay tuple ((a,b,c,...)).
+    var serializedTuple = [];
+    for (var i = 0, len = jsObj.length; i < len; i++) {
+      // Unserialize each JS value into a Fay value, too.
+      serializedTuple.push(Fay$$jsToFay(args[i],jsObj[i]));
+    }
+    // Pop it all in a Fay list.
+    return Fay$$list(serializedTuple);
+  }
+  else if(base == "defined") {
+    return jsObj === undefined
+      ? new Fay.FFI._Undefined()
+      : new Fay.FFI._Defined(Fay$$jsToFay(args[0],jsObj));
+  }
+  else if(base == "nullable") {
+    return jsObj === null
+      ? new Fay.FFI._Null()
+      : new Fay.FFI.Nullable(Fay$$jsToFay(args[0],jsObj));
+  }
+  else if(base == "int") {
+    // Int are unboxed, so there's no forcing to do.
+    // But we can do validation that the int has no decimal places.
+    // E.g. Math.round(x)!=x? throw "NOT AN INTEGER, GET OUT!"
+    fayObj = Math.round(jsObj);
+    if(fayObj!==jsObj) throw "Argument " + jsObj + " is not an integer!";
+    return fayObj;
+  }
+  else if (base == "double" ||
+           base == "bool" ||
+           base ==  "ptr" ||
+           base ==  "unknown") {
+    return jsObj;
+  }
+  else if(base == "automatic" && jsObj instanceof Function) {
+    var type = [["automatic"]];
+    for (var i = 0; i < jsObj.length; i++)
+      type.push(["automatic"]);
+    return Fay$$jsToFay(["function", type], jsObj);
+  }
+  else if(base == "automatic" && jsObj instanceof Array) {
+    var list = null;
+    for (var i = jsObj.length - 1; i >= 0; i--) {
+      list = new Fay$$Cons(Fay$$jsToFay([base], jsObj[i]), list);
+    }
+    return list;
+  }
+  else if(base == "automatic" || base == "user") {
+    if (jsObj && jsObj['instance']) {
+      var jsToFayFun = Fay$$jsToFayHash[jsObj["instance"]];
+      return jsToFayFun ? jsToFayFun(type,type[2],jsObj) : jsObj;
+    }
+    else
+      return jsObj;
+  }
+
+  throw new Error("Unhandled JS->Fay translation type: " + base);
+}
+
+// Stores the mappings from js objects to fay types.
+// This will be populated by compiled modules.
+var Fay$$jsToFayHash = {};
+
+/*******************************************************************************
+ * Lists.
+ */
+
+// Cons object.
+function Fay$$Cons(car,cdr){
+  this.car = car;
+  this.cdr = cdr;
+}
+
+// Make a list.
+function Fay$$list(xs){
+  var out = null;
+  for(var i=xs.length-1; i>=0;i--)
+    out = new Fay$$Cons(xs[i],out);
+  return out;
+}
+
+// Built-in list cons.
+function Fay$$cons(x){
+  return function(y){
+    return new Fay$$Cons(x,y);
+  };
+}
+
+// List index.
+// `list' is already forced by the time it's passed to this function.
+// `list' cannot be null and `index' cannot be out of bounds.
+function Fay$$index(index,list){
+  for(var i = 0; i < index; i++) {
+    list = Fay$$_(list.cdr);
+  }
+  return list.car;
+}
+
+// List length.
+// `list' is already forced by the time it's passed to this function.
+function Fay$$listLen(list,max){
+  for(var i = 0; list !== null && i < max + 1; i++) {
+    list = Fay$$_(list.cdr);
+  }
+  return i == max;
+}
+
+/*******************************************************************************
+ * Numbers.
+ */
+
+// Built-in *.
+function Fay$$mult(x){
+  return function(y){
+    return new Fay$$$(function(){
+      return Fay$$_(x) * Fay$$_(y);
+    });
+  };
+}
+
+function Fay$$mult$36$uncurried(x,y){
+
+  return new Fay$$$(function(){
+    return Fay$$_(x) * Fay$$_(y);
+  });
+
+}
+
+// Built-in +.
+function Fay$$add(x){
+  return function(y){
+    return new Fay$$$(function(){
+      return Fay$$_(x) + Fay$$_(y);
+    });
+  };
+}
+
+// Built-in +.
+function Fay$$add$36$uncurried(x,y){
+
+  return new Fay$$$(function(){
+    return Fay$$_(x) + Fay$$_(y);
+  });
+
+}
+
+// Built-in -.
+function Fay$$sub(x){
+  return function(y){
+    return new Fay$$$(function(){
+      return Fay$$_(x) - Fay$$_(y);
+    });
+  };
+}
+// Built-in -.
+function Fay$$sub$36$uncurried(x,y){
+
+  return new Fay$$$(function(){
+    return Fay$$_(x) - Fay$$_(y);
+  });
+
+}
+
+// Built-in /.
+function Fay$$divi(x){
+  return function(y){
+    return new Fay$$$(function(){
+      return Fay$$_(x) / Fay$$_(y);
+    });
+  };
+}
+
+// Built-in /.
+function Fay$$divi$36$uncurried(x,y){
+
+  return new Fay$$$(function(){
+    return Fay$$_(x) / Fay$$_(y);
+  });
+
+}
+
+/*******************************************************************************
+ * Booleans.
+ */
+
+// Are two values equal?
+function Fay$$equal(lit1, lit2) {
+  // Simple case
+  lit1 = Fay$$_(lit1);
+  lit2 = Fay$$_(lit2);
+  if (lit1 === lit2) {
+    return true;
+  }
+  // General case
+  if (lit1 instanceof Array) {
+    if (lit1.length != lit2.length) return false;
+    for (var len = lit1.length, i = 0; i < len; i++) {
+      if (!Fay$$equal(lit1[i], lit2[i])) return false;
+    }
+    return true;
+  } else if (lit1 instanceof Fay$$Cons && lit2 instanceof Fay$$Cons) {
+    do {
+      if (!Fay$$equal(lit1.car,lit2.car))
+        return false;
+      lit1 = Fay$$_(lit1.cdr), lit2 = Fay$$_(lit2.cdr);
+      if (lit1 === null || lit2 === null)
+        return lit1 === lit2;
+    } while (true);
+  } else if (typeof lit1 == 'object' && typeof lit2 == 'object' && lit1 && lit2 &&
+             lit1.instance === lit2.instance) {
+    for(var x in lit1) {
+      if(!Fay$$equal(lit1[x],lit2[x]))
+        return false;
+    }
+    return true;
+  } else {
+    return false;
+  }
+}
+
+// Built-in ==.
+function Fay$$eq(x){
+  return function(y){
+    return new Fay$$$(function(){
+      return Fay$$equal(x,y);
+    });
+  };
+}
+
+function Fay$$eq$36$uncurried(x,y){
+
+  return new Fay$$$(function(){
+    return Fay$$equal(x,y);
+  });
+
+}
+
+// Built-in /=.
+function Fay$$neq(x){
+  return function(y){
+    return new Fay$$$(function(){
+      return !(Fay$$equal(x,y));
+    });
+  };
+}
+
+// Built-in /=.
+function Fay$$neq$36$uncurried(x,y){
+
+  return new Fay$$$(function(){
+    return !(Fay$$equal(x,y));
+  });
+
+}
+
+// Built-in >.
+function Fay$$gt(x){
+  return function(y){
+    return new Fay$$$(function(){
+      return Fay$$_(x) > Fay$$_(y);
+    });
+  };
+}
+
+// Built-in >.
+function Fay$$gt$36$uncurried(x,y){
+
+  return new Fay$$$(function(){
+    return Fay$$_(x) > Fay$$_(y);
+  });
+
+}
+
+// Built-in <.
+function Fay$$lt(x){
+  return function(y){
+    return new Fay$$$(function(){
+      return Fay$$_(x) < Fay$$_(y);
+    });
+  };
+}
+
+
+// Built-in <.
+function Fay$$lt$36$uncurried(x,y){
+
+  return new Fay$$$(function(){
+    return Fay$$_(x) < Fay$$_(y);
+  });
+
+}
+
+
+// Built-in >=.
+function Fay$$gte(x){
+  return function(y){
+    return new Fay$$$(function(){
+      return Fay$$_(x) >= Fay$$_(y);
+    });
+  };
+}
+
+// Built-in >=.
+function Fay$$gte$36$uncurried(x,y){
+
+  return new Fay$$$(function(){
+    return Fay$$_(x) >= Fay$$_(y);
+  });
+
+}
+
+// Built-in <=.
+function Fay$$lte(x){
+  return function(y){
+    return new Fay$$$(function(){
+      return Fay$$_(x) <= Fay$$_(y);
+    });
+  };
+}
+
+// Built-in <=.
+function Fay$$lte$36$uncurried(x,y){
+
+  return new Fay$$$(function(){
+    return Fay$$_(x) <= Fay$$_(y);
+  });
+
+}
+
+// Built-in &&.
+function Fay$$and(x){
+  return function(y){
+    return new Fay$$$(function(){
+      return Fay$$_(x) && Fay$$_(y);
+    });
+  };
+}
+
+// Built-in &&.
+function Fay$$and$36$uncurried(x,y){
+
+  return new Fay$$$(function(){
+    return Fay$$_(x) && Fay$$_(y);
+  });
+  ;
+}
+
+// Built-in ||.
+function Fay$$or(x){
+  return function(y){
+    return new Fay$$$(function(){
+      return Fay$$_(x) || Fay$$_(y);
+    });
+  };
+}
+
+// Built-in ||.
+function Fay$$or$36$uncurried(x,y){
+
+  return new Fay$$$(function(){
+    return Fay$$_(x) || Fay$$_(y);
+  });
+
+}
+
+/*******************************************************************************
+ * Mutable references.
+ */
+
+// Make a new mutable reference.
+function Fay$$Ref(x){
+  this.value = x;
+}
+
+// Write to the ref.
+function Fay$$writeRef(ref,x){
+  ref.value = x;
+}
+
+// Get the value from the ref.
+function Fay$$readRef(ref,x){
+  return ref.value;
+}
+
+/*******************************************************************************
+ * Dates.
+ */
+function Fay$$date(str){
+  return window.Date.parse(str);
+}
+
+/*******************************************************************************
+ * Data.Var
+ */
+
+function Fay$$Ref2(val){
+  this.val = val;
+}
+
+function Fay$$Sig(){
+  this.handlers = [];
+}
+
+function Fay$$Var(val){
+  this.val = val;
+  this.handlers = [];
+}
+
+// Helper used by Fay$$setValue and for merging
+function Fay$$broadcastInternal(self, val, force){
+  var handlers = self.handlers;
+  var exceptions = [];
+  for(var len = handlers.length, i = 0; i < len; i++) {
+    try {
+      force(handlers[i][1](val), true);
+    } catch (e) {
+      exceptions.push(e);
+    }
+  }
+  // Rethrow the encountered exceptions.
+  if (exceptions.length > 0) {
+    console.error("Encountered " + exceptions.length + " exception(s) while broadcasing a change to ", self);
+    for(var len = exceptions.length, i = 0; i < len; i++) {
+      (function(exception) {
+        window.setTimeout(function() { throw exception; }, 0);
+      })(exceptions[i]);
+    }
+  }
+}
+
+function Fay$$setValue(self, val, force){
+  if (self instanceof Fay$$Ref2) {
+    self.val = val;
+  } else if (self instanceof Fay$$Var) {
+    self.val = val;
+    Fay$$broadcastInternal(self, val, force);
+  } else if (self instanceof Fay$$Sig) {
+    Fay$$broadcastInternal(self, val, force);
+  } else {
+    throw "Fay$$setValue given something that's not a Ref2, Var, or Sig"
+  }
+}
+
+function Fay$$subscribe(self, f){
+  var key = {};
+  self.handlers.push([key,f]);
+  var searchStart = self.handlers.length - 1;
+  return function(_){
+    for(var i = Math.min(searchStart, self.handlers.length - 1); i >= 0; i--) {
+      if(self.handlers[i][0] == key) {
+        self.handlers = self.handlers.slice(0,i).concat(self.handlers.slice(i+1));
+        return;
+      }
+    }
+    return _; // This variable has to be used, otherwise Closure
+              // strips it out and Fay serialization breaks.
+  };
+}
+
+/*******************************************************************************
+ * Application code.
+ */
+
+var Data = {};
+Data.Data = {};
+var Fay = {};
+Fay.FFI = {};
+Fay.FFI._Nullable = function Nullable(slot1){
+  this.slot1 = slot1;
+};
+Fay.FFI._Nullable.prototype.instance = "Nullable";
+Fay.FFI.Nullable = function(slot1){
+  return new Fay$$$(function(){
+    return new Fay.FFI._Nullable(slot1);
+  });
+};
+Fay.FFI._Null = function Null(){
+};
+Fay.FFI._Null.prototype.instance = "Null";
+Fay.FFI.Null = new Fay$$$(function(){
+  return new Fay.FFI._Null();
+});
+Fay.FFI._Defined = function Defined(slot1){
+  this.slot1 = slot1;
+};
+Fay.FFI._Defined.prototype.instance = "Defined";
+Fay.FFI.Defined = function(slot1){
+  return new Fay$$$(function(){
+    return new Fay.FFI._Defined(slot1);
+  });
+};
+Fay.FFI._Undefined = function Undefined(){
+};
+Fay.FFI._Undefined.prototype.instance = "Undefined";
+Fay.FFI.Undefined = new Fay$$$(function(){
+  return new Fay.FFI._Undefined();
+});
+Fay$$objConcat(Fay$$fayToJsHash,{"Nullable": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Nullable"};
+  var obj_slot1 = Fay$$fayToJs(argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"],_obj.slot1);
+  if (undefined !== obj_slot1) {
+    obj_['slot1'] = obj_slot1;
+  }
+  return obj_;
+},"Null": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Null"};
+  return obj_;
+},"Defined": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Defined"};
+  var obj_slot1 = Fay$$fayToJs(argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"],_obj.slot1);
+  if (undefined !== obj_slot1) {
+    obj_['slot1'] = obj_slot1;
+  }
+  return obj_;
+},"Undefined": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Undefined"};
+  return obj_;
+}});
+Fay$$objConcat(Fay$$jsToFayHash,{"Nullable": function(type,argTypes,obj){
+  return new Fay.FFI._Nullable(Fay$$jsToFay(argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"],obj["slot1"]));
+},"Null": function(type,argTypes,obj){
+  return new Fay.FFI._Null();
+},"Defined": function(type,argTypes,obj){
+  return new Fay.FFI._Defined(Fay$$jsToFay(argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"],obj["slot1"]));
+},"Undefined": function(type,argTypes,obj){
+  return new Fay.FFI._Undefined();
+}});
+var Prelude = {};
+Prelude._Just = function Just(slot1){
+  this.slot1 = slot1;
+};
+Prelude._Just.prototype.instance = "Just";
+Prelude.Just = function(slot1){
+  return new Fay$$$(function(){
+    return new Prelude._Just(slot1);
+  });
+};
+Prelude._Nothing = function Nothing(){
+};
+Prelude._Nothing.prototype.instance = "Nothing";
+Prelude.Nothing = new Fay$$$(function(){
+  return new Prelude._Nothing();
+});
+Prelude._Left = function Left(slot1){
+  this.slot1 = slot1;
+};
+Prelude._Left.prototype.instance = "Left";
+Prelude.Left = function(slot1){
+  return new Fay$$$(function(){
+    return new Prelude._Left(slot1);
+  });
+};
+Prelude._Right = function Right(slot1){
+  this.slot1 = slot1;
+};
+Prelude._Right.prototype.instance = "Right";
+Prelude.Right = function(slot1){
+  return new Fay$$$(function(){
+    return new Prelude._Right(slot1);
+  });
+};
+Prelude.maybe = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        if (Fay$$_($p3) instanceof Prelude._Nothing) {
+          var m = $p1;
+          return m;
+        }
+        if (Fay$$_($p3) instanceof Prelude._Just) {
+          var x = Fay$$_($p3).slot1;
+          var f = $p2;
+          return Fay$$_(f)(x);
+        }
+        throw ["unhandled case in maybe",[$p1,$p2,$p3]];
+      });
+    };
+  };
+};
+Prelude.$62$$62$$61$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$_(Fay$$bind($p1)($p2));
+    });
+  };
+};
+Prelude.$62$$62$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$_(Fay$$then($p1)($p2));
+    });
+  };
+};
+Prelude.$_return = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$return(Fay$$fayToJs(["unknown"],$p1))));
+  });
+};
+Prelude.fail = new Fay$$$(function(){
+  return Prelude.error;
+});
+Prelude.when = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var m = $p2;
+      var p = $p1;
+      return Fay$$_(p) ? Fay$$_(Fay$$_(Fay$$then)(m))(Fay$$_(Fay$$$_return)(Fay$$unit)) : Fay$$_(Fay$$$_return)(Fay$$unit);
+    });
+  };
+};
+Prelude.unless = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var m = $p2;
+      var p = $p1;
+      return Fay$$_(p) ? Fay$$_(Fay$$$_return)(Fay$$unit) : Fay$$_(Fay$$_(Fay$$then)(m))(Fay$$_(Fay$$$_return)(Fay$$unit));
+    });
+  };
+};
+Prelude.forM = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var fn = $p2;
+      var lst = $p1;
+      return Fay$$_(Fay$$_(Prelude.$36$)(Prelude.sequence))(Fay$$_(Fay$$_(Prelude.map)(fn))(lst));
+    });
+  };
+};
+Prelude.forM_ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var m = $p2;
+      var $tmp1 = Fay$$_($p1);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(m)(x)))(Fay$$_(Fay$$_(Prelude.forM_)(xs))(m));
+      }
+      if (Fay$$_($p1) === null) {
+        return Fay$$_(Fay$$$_return)(Fay$$unit);
+      }
+      throw ["unhandled case in forM_",[$p1,$p2]];
+    });
+  };
+};
+Prelude.mapM = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var lst = $p2;
+      var fn = $p1;
+      return Fay$$_(Fay$$_(Prelude.$36$)(Prelude.sequence))(Fay$$_(Fay$$_(Prelude.map)(fn))(lst));
+    });
+  };
+};
+Prelude.mapM_ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var m = $p1;
+        return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(m)(x)))(Fay$$_(Fay$$_(Prelude.mapM_)(m))(xs));
+      }
+      if (Fay$$_($p2) === null) {
+        return Fay$$_(Fay$$$_return)(Fay$$unit);
+      }
+      throw ["unhandled case in mapM_",[$p1,$p2]];
+    });
+  };
+};
+Prelude.$61$$60$$60$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var x = $p2;
+      var f = $p1;
+      return Fay$$_(Fay$$_(Fay$$bind)(x))(f);
+    });
+  };
+};
+Prelude.$_void = function($p1){
+  return new Fay$$$(function(){
+    var f = $p1;
+    return Fay$$_(Fay$$_(Fay$$then)(f))(Fay$$_(Fay$$$_return)(Fay$$unit));
+  });
+};
+Prelude.$62$$61$$62$ = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var x = $p3;
+        var g = $p2;
+        var f = $p1;
+        return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(f)(x)))(g);
+      });
+    };
+  };
+};
+Prelude.$60$$61$$60$ = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var x = $p3;
+        var f = $p2;
+        var g = $p1;
+        return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(f)(x)))(g);
+      });
+    };
+  };
+};
+Prelude.sequence = function($p1){
+  return new Fay$$$(function(){
+    var ms = $p1;
+    return (function(){
+      var k = function($p1){
+        return function($p2){
+          return new Fay$$$(function(){
+            var m$39$ = $p2;
+            var m = $p1;
+            return Fay$$_(Fay$$_(Fay$$bind)(m))(function($p1){
+              var x = $p1;
+              return Fay$$_(Fay$$_(Fay$$bind)(m$39$))(function($p1){
+                var xs = $p1;
+                return Fay$$_(Fay$$$_return)(Fay$$_(Fay$$_(Fay$$cons)(x))(xs));
+              });
+            });
+          });
+        };
+      };
+      return Fay$$_(Fay$$_(Fay$$_(Prelude.foldr)(k))(Fay$$_(Fay$$$_return)(null)))(ms);
+    })();
+  });
+};
+Prelude.sequence_ = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) === null) {
+      return Fay$$_(Fay$$$_return)(Fay$$unit);
+    }
+    var $tmp1 = Fay$$_($p1);
+    if ($tmp1 instanceof Fay$$Cons) {
+      var m = $tmp1.car;
+      var ms = $tmp1.cdr;
+      return Fay$$_(Fay$$_(Fay$$then)(m))(Fay$$_(Prelude.sequence_)(ms));
+    }
+    throw ["unhandled case in sequence_",[$p1]];
+  });
+};
+Prelude._GT = function GT(){
+};
+Prelude._GT.prototype.instance = "GT";
+Prelude.GT = new Fay$$$(function(){
+  return new Prelude._GT();
+});
+Prelude._LT = function LT(){
+};
+Prelude._LT.prototype.instance = "LT";
+Prelude.LT = new Fay$$$(function(){
+  return new Prelude._LT();
+});
+Prelude._EQ = function EQ(){
+};
+Prelude._EQ.prototype.instance = "EQ";
+Prelude.EQ = new Fay$$$(function(){
+  return new Prelude._EQ();
+});
+Prelude.compare = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var y = $p2;
+      var x = $p1;
+      return Fay$$_(Fay$$_(Fay$$_(Fay$$gt)(x))(y)) ? Prelude.GT : Fay$$_(Fay$$_(Fay$$_(Fay$$lt)(x))(y)) ? Prelude.LT : Prelude.EQ;
+    });
+  };
+};
+Prelude.succ = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return Fay$$_(Fay$$_(Fay$$add)(x))(1);
+  });
+};
+Prelude.pred = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return Fay$$_(Fay$$_(Fay$$sub)(x))(1);
+  });
+};
+Prelude.enumFrom = function($p1){
+  return new Fay$$$(function(){
+    var i = $p1;
+    return Fay$$_(Fay$$_(Fay$$cons)(i))(Fay$$_(Prelude.enumFrom)(Fay$$_(Fay$$_(Fay$$add)(i))(1)));
+  });
+};
+Prelude.enumFromTo = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var n = $p2;
+      var i = $p1;
+      return Fay$$_(Fay$$_(Fay$$_(Fay$$gt)(i))(n)) ? null : Fay$$_(Fay$$_(Fay$$cons)(i))(Fay$$_(Fay$$_(Prelude.enumFromTo)(Fay$$_(Fay$$_(Fay$$add)(i))(1)))(n));
+    });
+  };
+};
+Prelude.enumFromBy = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var by = $p2;
+      var fr = $p1;
+      return Fay$$_(Fay$$_(Fay$$cons)(fr))(Fay$$_(Fay$$_(Prelude.enumFromBy)(Fay$$_(Fay$$_(Fay$$add)(fr))(by)))(by));
+    });
+  };
+};
+Prelude.enumFromThen = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var th = $p2;
+      var fr = $p1;
+      return Fay$$_(Fay$$_(Prelude.enumFromBy)(fr))(Fay$$_(Fay$$_(Fay$$sub)(th))(fr));
+    });
+  };
+};
+Prelude.enumFromByTo = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var to = $p3;
+        var by = $p2;
+        var fr = $p1;
+        return (function(){
+          var neg = function($p1){
+            return new Fay$$$(function(){
+              var x = $p1;
+              return Fay$$_(Fay$$_(Fay$$_(Fay$$lt)(x))(to)) ? null : Fay$$_(Fay$$_(Fay$$cons)(x))(Fay$$_(neg)(Fay$$_(Fay$$_(Fay$$add)(x))(by)));
+            });
+          };
+          var pos = function($p1){
+            return new Fay$$$(function(){
+              var x = $p1;
+              return Fay$$_(Fay$$_(Fay$$_(Fay$$gt)(x))(to)) ? null : Fay$$_(Fay$$_(Fay$$cons)(x))(Fay$$_(pos)(Fay$$_(Fay$$_(Fay$$add)(x))(by)));
+            });
+          };
+          return Fay$$_(Fay$$_(Fay$$_(Fay$$lt)(by))(0)) ? Fay$$_(neg)(fr) : Fay$$_(pos)(fr);
+        })();
+      });
+    };
+  };
+};
+Prelude.enumFromThenTo = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var to = $p3;
+        var th = $p2;
+        var fr = $p1;
+        return Fay$$_(Fay$$_(Fay$$_(Prelude.enumFromByTo)(fr))(Fay$$_(Fay$$_(Fay$$sub)(th))(fr)))(to);
+      });
+    };
+  };
+};
+Prelude.fromIntegral = function($p1){
+  return new Fay$$$(function(){
+    return $p1;
+  });
+};
+Prelude.fromInteger = function($p1){
+  return new Fay$$$(function(){
+    return $p1;
+  });
+};
+Prelude.not = function($p1){
+  return new Fay$$$(function(){
+    var p = $p1;
+    return Fay$$_(p) ? false : true;
+  });
+};
+Prelude.otherwise = true;
+Prelude.show = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_string(JSON.stringify(Fay$$fayToJs(["automatic"],$p1)));
+  });
+};
+Prelude.error = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["unknown"],(function() { throw Fay$$fayToJs_string($p1) })());
+  });
+};
+Prelude.$_undefined = new Fay$$$(function(){
+  return Fay$$_(Prelude.error)(Fay$$list("Prelude.undefined"));
+});
+Prelude.either = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        if (Fay$$_($p3) instanceof Prelude._Left) {
+          var a = Fay$$_($p3).slot1;
+          var f = $p1;
+          return Fay$$_(f)(a);
+        }
+        if (Fay$$_($p3) instanceof Prelude._Right) {
+          var b = Fay$$_($p3).slot1;
+          var g = $p2;
+          return Fay$$_(g)(b);
+        }
+        throw ["unhandled case in either",[$p1,$p2,$p3]];
+      });
+    };
+  };
+};
+Prelude.until = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var x = $p3;
+        var f = $p2;
+        var p = $p1;
+        return Fay$$_(Fay$$_(p)(x)) ? x : Fay$$_(Fay$$_(Fay$$_(Prelude.until)(p))(f))(Fay$$_(f)(x));
+      });
+    };
+  };
+};
+Prelude.$36$$33$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var x = $p2;
+      var f = $p1;
+      return Fay$$_(Fay$$_(Fay$$seq)(x))(Fay$$_(f)(x));
+    });
+  };
+};
+Prelude.$_const = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var a = $p1;
+      return a;
+    });
+  };
+};
+Prelude.id = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return x;
+  });
+};
+Prelude.$46$ = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var x = $p3;
+        var g = $p2;
+        var f = $p1;
+        return Fay$$_(f)(Fay$$_(g)(x));
+      });
+    };
+  };
+};
+Prelude.$36$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var x = $p2;
+      var f = $p1;
+      return Fay$$_(f)(x);
+    });
+  };
+};
+Prelude.flip = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var y = $p3;
+        var x = $p2;
+        var f = $p1;
+        return Fay$$_(Fay$$_(f)(y))(x);
+      });
+    };
+  };
+};
+Prelude.curry = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var y = $p3;
+        var x = $p2;
+        var f = $p1;
+        return Fay$$_(f)(Fay$$list([x,y]));
+      });
+    };
+  };
+};
+Prelude.uncurry = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var p = $p2;
+      var f = $p1;
+      return (function($tmp1){
+        if (Fay$$listLen(Fay$$_($tmp1),2)) {
+          var x = Fay$$index(0,Fay$$_($tmp1));
+          var y = Fay$$index(1,Fay$$_($tmp1));
+          return Fay$$_(Fay$$_(f)(x))(y);
+        }
+        return (function(){ throw (["unhandled case",$tmp1]); })();
+      })(p);
+    });
+  };
+};
+Prelude.snd = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$listLen(Fay$$_($p1),2)) {
+      var x = Fay$$index(1,Fay$$_($p1));
+      return x;
+    }
+    throw ["unhandled case in snd",[$p1]];
+  });
+};
+Prelude.fst = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$listLen(Fay$$_($p1),2)) {
+      var x = Fay$$index(0,Fay$$_($p1));
+      return x;
+    }
+    throw ["unhandled case in fst",[$p1]];
+  });
+};
+Prelude.div = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var y = $p2;
+      var x = $p1;
+      if (Fay$$_(Fay$$_(Fay$$_(Fay$$and)(Fay$$_(Fay$$_(Fay$$gt)(x))(0)))(Fay$$_(Fay$$_(Fay$$lt)(y))(0)))) {
+        return Fay$$_(Fay$$_(Fay$$sub)(Fay$$_(Fay$$_(Prelude.quot)(Fay$$_(Fay$$_(Fay$$sub)(x))(1)))(y)))(1);
+      } else {if (Fay$$_(Fay$$_(Fay$$_(Fay$$and)(Fay$$_(Fay$$_(Fay$$lt)(x))(0)))(Fay$$_(Fay$$_(Fay$$gt)(y))(0)))) {
+          return Fay$$_(Fay$$_(Fay$$sub)(Fay$$_(Fay$$_(Prelude.quot)(Fay$$_(Fay$$_(Fay$$add)(x))(1)))(y)))(1);
+        }
+      }
+      var y = $p2;
+      var x = $p1;
+      return Fay$$_(Fay$$_(Prelude.quot)(x))(y);
+    });
+  };
+};
+Prelude.mod = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var y = $p2;
+      var x = $p1;
+      if (Fay$$_(Fay$$_(Fay$$_(Fay$$and)(Fay$$_(Fay$$_(Fay$$gt)(x))(0)))(Fay$$_(Fay$$_(Fay$$lt)(y))(0)))) {
+        return Fay$$_(Fay$$_(Fay$$add)(Fay$$_(Fay$$_(Fay$$add)(Fay$$_(Fay$$_(Prelude.rem)(Fay$$_(Fay$$_(Fay$$sub)(x))(1)))(y)))(y)))(1);
+      } else {if (Fay$$_(Fay$$_(Fay$$_(Fay$$and)(Fay$$_(Fay$$_(Fay$$lt)(x))(0)))(Fay$$_(Fay$$_(Fay$$gt)(y))(0)))) {
+          return Fay$$_(Fay$$_(Fay$$sub)(Fay$$_(Fay$$_(Fay$$add)(Fay$$_(Fay$$_(Prelude.rem)(Fay$$_(Fay$$_(Fay$$add)(x))(1)))(y)))(y)))(1);
+        }
+      }
+      var y = $p2;
+      var x = $p1;
+      return Fay$$_(Fay$$_(Prelude.rem)(x))(y);
+    });
+  };
+};
+Prelude.divMod = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var y = $p2;
+      var x = $p1;
+      if (Fay$$_(Fay$$_(Fay$$_(Fay$$and)(Fay$$_(Fay$$_(Fay$$gt)(x))(0)))(Fay$$_(Fay$$_(Fay$$lt)(y))(0)))) {
+        return (function($tmp1){
+          if (Fay$$listLen(Fay$$_($tmp1),2)) {
+            var q = Fay$$index(0,Fay$$_($tmp1));
+            var r = Fay$$index(1,Fay$$_($tmp1));
+            return Fay$$list([Fay$$_(Fay$$_(Fay$$sub)(q))(1),Fay$$_(Fay$$_(Fay$$add)(Fay$$_(Fay$$_(Fay$$add)(r))(y)))(1)]);
+          }
+          return (function(){ throw (["unhandled case",$tmp1]); })();
+        })(Fay$$_(Fay$$_(Prelude.quotRem)(Fay$$_(Fay$$_(Fay$$sub)(x))(1)))(y));
+      } else {if (Fay$$_(Fay$$_(Fay$$_(Fay$$and)(Fay$$_(Fay$$_(Fay$$lt)(x))(0)))(Fay$$_(Fay$$_(Fay$$gt)(y))(1)))) {
+          return (function($tmp1){
+            if (Fay$$listLen(Fay$$_($tmp1),2)) {
+              var q = Fay$$index(0,Fay$$_($tmp1));
+              var r = Fay$$index(1,Fay$$_($tmp1));
+              return Fay$$list([Fay$$_(Fay$$_(Fay$$sub)(q))(1),Fay$$_(Fay$$_(Fay$$sub)(Fay$$_(Fay$$_(Fay$$add)(r))(y)))(1)]);
+            }
+            return (function(){ throw (["unhandled case",$tmp1]); })();
+          })(Fay$$_(Fay$$_(Prelude.quotRem)(Fay$$_(Fay$$_(Fay$$add)(x))(1)))(y));
+        }
+      }
+      var y = $p2;
+      var x = $p1;
+      return Fay$$_(Fay$$_(Prelude.quotRem)(x))(y);
+    });
+  };
+};
+Prelude.min = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["unknown"],Math.min(Fay$$_(Fay$$fayToJs(["unknown"],$p1)),Fay$$_(Fay$$fayToJs(["unknown"],$p2))));
+    });
+  };
+};
+Prelude.max = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["unknown"],Math.max(Fay$$_(Fay$$fayToJs(["unknown"],$p1)),Fay$$_(Fay$$fayToJs(["unknown"],$p2))));
+    });
+  };
+};
+Prelude.recip = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return Fay$$_(Fay$$_(Fay$$divi)(1))(x);
+  });
+};
+Prelude.negate = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return (-(Fay$$_(x)));
+  });
+};
+Prelude.abs = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return Fay$$_(Fay$$_(Fay$$_(Fay$$lt)(x))(0)) ? Fay$$_(Prelude.negate)(x) : x;
+  });
+};
+Prelude.signum = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return Fay$$_(Fay$$_(Fay$$_(Fay$$gt)(x))(0)) ? 1 : Fay$$_(Fay$$_(Fay$$_(Fay$$eq)(x))(0)) ? 0 : (-(1));
+  });
+};
+Prelude.pi = new Fay$$$(function(){
+  return Fay$$jsToFay_double(Math.PI);
+});
+Prelude.exp = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_double(Math.exp(Fay$$fayToJs_double($p1)));
+  });
+};
+Prelude.sqrt = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_double(Math.sqrt(Fay$$fayToJs_double($p1)));
+  });
+};
+Prelude.log = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_double(Math.log(Fay$$fayToJs_double($p1)));
+  });
+};
+Prelude.$42$$42$ = new Fay$$$(function(){
+  return Prelude.unsafePow;
+});
+Prelude.$94$$94$ = new Fay$$$(function(){
+  return Prelude.unsafePow;
+});
+Prelude.unsafePow = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["unknown"],Math.pow(Fay$$_(Fay$$fayToJs(["unknown"],$p1)),Fay$$_(Fay$$fayToJs(["unknown"],$p2))));
+    });
+  };
+};
+Prelude.$94$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var b = $p2;
+      var a = $p1;
+      if (Fay$$_(Fay$$_(Fay$$_(Fay$$lt)(b))(0))) {
+        return Fay$$_(Prelude.error)(Fay$$list("(^): negative exponent"));
+      } else {if (Fay$$_(Fay$$_(Fay$$_(Fay$$eq)(b))(0))) {
+          return 1;
+        } else {if (Fay$$_(Fay$$_(Prelude.even)(b))) {
+            return (function(){
+              return new Fay$$$(function(){
+                var x = new Fay$$$(function(){
+                  return Fay$$_(Fay$$_(Prelude.$94$)(a))(Fay$$_(Fay$$_(Prelude.quot)(b))(2));
+                });
+                return Fay$$_(Fay$$_(Fay$$mult)(x))(x);
+              });
+            })();
+          }
+        }
+      }
+      var b = $p2;
+      var a = $p1;
+      return Fay$$_(Fay$$_(Fay$$mult)(a))(Fay$$_(Fay$$_(Prelude.$94$)(a))(Fay$$_(Fay$$_(Fay$$sub)(b))(1)));
+    });
+  };
+};
+Prelude.logBase = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var x = $p2;
+      var b = $p1;
+      return Fay$$_(Fay$$_(Fay$$divi)(Fay$$_(Prelude.log)(x)))(Fay$$_(Prelude.log)(b));
+    });
+  };
+};
+Prelude.sin = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_double(Math.sin(Fay$$fayToJs_double($p1)));
+  });
+};
+Prelude.tan = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_double(Math.tan(Fay$$fayToJs_double($p1)));
+  });
+};
+Prelude.cos = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_double(Math.cos(Fay$$fayToJs_double($p1)));
+  });
+};
+Prelude.asin = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_double(Math.asin(Fay$$fayToJs_double($p1)));
+  });
+};
+Prelude.atan = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_double(Math.atan(Fay$$fayToJs_double($p1)));
+  });
+};
+Prelude.acos = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_double(Math.acos(Fay$$fayToJs_double($p1)));
+  });
+};
+Prelude.sinh = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return Fay$$_(Fay$$_(Fay$$divi)(Fay$$_(Fay$$_(Fay$$sub)(Fay$$_(Prelude.exp)(x)))(Fay$$_(Prelude.exp)((-(Fay$$_(x)))))))(2);
+  });
+};
+Prelude.tanh = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return (function(){
+      return new Fay$$$(function(){
+        var a = new Fay$$$(function(){
+          return Fay$$_(Prelude.exp)(x);
+        });
+        var b = new Fay$$$(function(){
+          return Fay$$_(Prelude.exp)((-(Fay$$_(x))));
+        });
+        return Fay$$_(Fay$$_(Fay$$divi)(Fay$$_(Fay$$_(Fay$$sub)(a))(b)))(Fay$$_(Fay$$_(Fay$$add)(a))(b));
+      });
+    })();
+  });
+};
+Prelude.cosh = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return Fay$$_(Fay$$_(Fay$$divi)(Fay$$_(Fay$$_(Fay$$add)(Fay$$_(Prelude.exp)(x)))(Fay$$_(Prelude.exp)((-(Fay$$_(x)))))))(2);
+  });
+};
+Prelude.asinh = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return Fay$$_(Prelude.log)(Fay$$_(Fay$$_(Fay$$add)(x))(Fay$$_(Prelude.sqrt)(Fay$$_(Fay$$_(Fay$$add)(Fay$$_(Fay$$_(Prelude.$42$$42$)(x))(2)))(1))));
+  });
+};
+Prelude.atanh = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return Fay$$_(Fay$$_(Fay$$divi)(Fay$$_(Prelude.log)(Fay$$_(Fay$$_(Fay$$divi)(Fay$$_(Fay$$_(Fay$$add)(1))(x)))(Fay$$_(Fay$$_(Fay$$sub)(1))(x)))))(2);
+  });
+};
+Prelude.acosh = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return Fay$$_(Prelude.log)(Fay$$_(Fay$$_(Fay$$add)(x))(Fay$$_(Prelude.sqrt)(Fay$$_(Fay$$_(Fay$$sub)(Fay$$_(Fay$$_(Prelude.$42$$42$)(x))(2)))(1))));
+  });
+};
+Prelude.properFraction = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return (function(){
+      return new Fay$$$(function(){
+        var a = new Fay$$$(function(){
+          return Fay$$_(Prelude.truncate)(x);
+        });
+        return Fay$$list([a,Fay$$_(Fay$$_(Fay$$sub)(x))(Fay$$_(Prelude.fromIntegral)(a))]);
+      });
+    })();
+  });
+};
+Prelude.truncate = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return Fay$$_(Fay$$_(Fay$$_(Fay$$lt)(x))(0)) ? Fay$$_(Prelude.ceiling)(x) : Fay$$_(Prelude.floor)(x);
+  });
+};
+Prelude.round = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_int(Math.round(Fay$$fayToJs_double($p1)));
+  });
+};
+Prelude.ceiling = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_int(Math.ceil(Fay$$fayToJs_double($p1)));
+  });
+};
+Prelude.floor = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_int(Math.floor(Fay$$fayToJs_double($p1)));
+  });
+};
+Prelude.subtract = new Fay$$$(function(){
+  return Fay$$_(Prelude.flip)(Fay$$sub);
+});
+Prelude.even = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return Fay$$_(Fay$$_(Fay$$eq)(Fay$$_(Fay$$_(Prelude.rem)(x))(2)))(0);
+  });
+};
+Prelude.odd = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return Fay$$_(Prelude.not)(Fay$$_(Prelude.even)(x));
+  });
+};
+Prelude.gcd = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var b = $p2;
+      var a = $p1;
+      return (function(){
+        var go = function($p1){
+          return function($p2){
+            return new Fay$$$(function(){
+              if (Fay$$_($p2) === 0) {
+                var x = $p1;
+                return x;
+              }
+              var y = $p2;
+              var x = $p1;
+              return Fay$$_(Fay$$_(go)(y))(Fay$$_(Fay$$_(Prelude.rem)(x))(y));
+            });
+          };
+        };
+        return Fay$$_(Fay$$_(go)(Fay$$_(Prelude.abs)(a)))(Fay$$_(Prelude.abs)(b));
+      })();
+    });
+  };
+};
+Prelude.quot = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var y = $p2;
+      var x = $p1;
+      return Fay$$_(Fay$$_(Fay$$_(Fay$$eq)(y))(0)) ? Fay$$_(Prelude.error)(Fay$$list("Division by zero")) : Fay$$_(Fay$$_(Prelude.quot$39$)(x))(y);
+    });
+  };
+};
+Prelude.quot$39$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay_int(~~(Fay$$fayToJs_int($p1)/Fay$$fayToJs_int($p2)));
+    });
+  };
+};
+Prelude.quotRem = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var y = $p2;
+      var x = $p1;
+      return Fay$$list([Fay$$_(Fay$$_(Prelude.quot)(x))(y),Fay$$_(Fay$$_(Prelude.rem)(x))(y)]);
+    });
+  };
+};
+Prelude.rem = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var y = $p2;
+      var x = $p1;
+      return Fay$$_(Fay$$_(Fay$$_(Fay$$eq)(y))(0)) ? Fay$$_(Prelude.error)(Fay$$list("Division by zero")) : Fay$$_(Fay$$_(Prelude.rem$39$)(x))(y);
+    });
+  };
+};
+Prelude.rem$39$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay_int(Fay$$fayToJs_int($p1) % Fay$$fayToJs_int($p2));
+    });
+  };
+};
+Prelude.lcm = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p2) === 0) {
+        return 0;
+      }
+      if (Fay$$_($p1) === 0) {
+        return 0;
+      }
+      var b = $p2;
+      var a = $p1;
+      return Fay$$_(Prelude.abs)(Fay$$_(Fay$$_(Fay$$mult)(Fay$$_(Fay$$_(Prelude.quot)(a))(Fay$$_(Fay$$_(Prelude.gcd)(a))(b))))(b));
+    });
+  };
+};
+Prelude.find = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var p = $p1;
+        return Fay$$_(Fay$$_(p)(x)) ? Fay$$_(Prelude.Just)(x) : Fay$$_(Fay$$_(Prelude.find)(p))(xs);
+      }
+      if (Fay$$_($p2) === null) {
+        return Prelude.Nothing;
+      }
+      throw ["unhandled case in find",[$p1,$p2]];
+    });
+  };
+};
+Prelude.filter = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var p = $p1;
+        return Fay$$_(Fay$$_(p)(x)) ? Fay$$_(Fay$$_(Fay$$cons)(x))(Fay$$_(Fay$$_(Prelude.filter)(p))(xs)) : Fay$$_(Fay$$_(Prelude.filter)(p))(xs);
+      }
+      if (Fay$$_($p2) === null) {
+        return null;
+      }
+      throw ["unhandled case in filter",[$p1,$p2]];
+    });
+  };
+};
+Prelude.$_null = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) === null) {
+      return true;
+    }
+    return false;
+  });
+};
+Prelude.map = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p2) === null) {
+        return null;
+      }
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var f = $p1;
+        return Fay$$_(Fay$$_(Fay$$cons)(Fay$$_(f)(x)))(Fay$$_(Fay$$_(Prelude.map)(f))(xs));
+      }
+      throw ["unhandled case in map",[$p1,$p2]];
+    });
+  };
+};
+Prelude.nub = function($p1){
+  return new Fay$$$(function(){
+    var ls = $p1;
+    return Fay$$_(Fay$$_(Prelude.nub$39$)(ls))(null);
+  });
+};
+Prelude.nub$39$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p1) === null) {
+        return null;
+      }
+      var ls = $p2;
+      var $tmp1 = Fay$$_($p1);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        return Fay$$_(Fay$$_(Fay$$_(Prelude.elem)(x))(ls)) ? Fay$$_(Fay$$_(Prelude.nub$39$)(xs))(ls) : Fay$$_(Fay$$_(Fay$$cons)(x))(Fay$$_(Fay$$_(Prelude.nub$39$)(xs))(Fay$$_(Fay$$_(Fay$$cons)(x))(ls)));
+      }
+      throw ["unhandled case in nub'",[$p1,$p2]];
+    });
+  };
+};
+Prelude.elem = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var y = $tmp1.car;
+        var ys = $tmp1.cdr;
+        var x = $p1;
+        return Fay$$_(Fay$$_(Fay$$or)(Fay$$_(Fay$$_(Fay$$eq)(x))(y)))(Fay$$_(Fay$$_(Prelude.elem)(x))(ys));
+      }
+      if (Fay$$_($p2) === null) {
+        return false;
+      }
+      throw ["unhandled case in elem",[$p1,$p2]];
+    });
+  };
+};
+Prelude.notElem = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var ys = $p2;
+      var x = $p1;
+      return Fay$$_(Prelude.not)(Fay$$_(Fay$$_(Prelude.elem)(x))(ys));
+    });
+  };
+};
+Prelude.sort = new Fay$$$(function(){
+  return Fay$$_(Prelude.sortBy)(Prelude.compare);
+});
+Prelude.sortBy = function($p1){
+  return new Fay$$$(function(){
+    var cmp = $p1;
+    return Fay$$_(Fay$$_(Prelude.foldr)(Fay$$_(Prelude.insertBy)(cmp)))(null);
+  });
+};
+Prelude.insertBy = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        if (Fay$$_($p3) === null) {
+          var x = $p2;
+          return Fay$$list([x]);
+        }
+        var ys = $p3;
+        var x = $p2;
+        var cmp = $p1;
+        return (function($tmp1){
+          if (Fay$$_($tmp1) === null) {
+            return Fay$$list([x]);
+          }
+          var $tmp2 = Fay$$_($tmp1);
+          if ($tmp2 instanceof Fay$$Cons) {
+            var y = $tmp2.car;
+            var ys$39$ = $tmp2.cdr;
+            return (function($tmp2){
+              if (Fay$$_($tmp2) instanceof Prelude._GT) {
+                return Fay$$_(Fay$$_(Fay$$cons)(y))(Fay$$_(Fay$$_(Fay$$_(Prelude.insertBy)(cmp))(x))(ys$39$));
+              }
+              return Fay$$_(Fay$$_(Fay$$cons)(x))(ys);
+            })(Fay$$_(Fay$$_(cmp)(x))(y));
+          }
+          return (function(){ throw (["unhandled case",$tmp1]); })();
+        })(ys);
+      });
+    };
+  };
+};
+Prelude.conc = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var ys = $p2;
+      var $tmp1 = Fay$$_($p1);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        return Fay$$_(Fay$$_(Fay$$cons)(x))(Fay$$_(Fay$$_(Prelude.conc)(xs))(ys));
+      }
+      var ys = $p2;
+      if (Fay$$_($p1) === null) {
+        return ys;
+      }
+      throw ["unhandled case in conc",[$p1,$p2]];
+    });
+  };
+};
+Prelude.concat = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Prelude.foldr)(Prelude.conc))(null);
+});
+Prelude.concatMap = function($p1){
+  return new Fay$$$(function(){
+    var f = $p1;
+    return Fay$$_(Fay$$_(Prelude.foldr)(Fay$$_(Fay$$_(Prelude.$46$)(Prelude.$43$$43$))(f)))(null);
+  });
+};
+Prelude.foldr = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        if (Fay$$_($p3) === null) {
+          var z = $p2;
+          return z;
+        }
+        var $tmp1 = Fay$$_($p3);
+        if ($tmp1 instanceof Fay$$Cons) {
+          var x = $tmp1.car;
+          var xs = $tmp1.cdr;
+          var z = $p2;
+          var f = $p1;
+          return Fay$$_(Fay$$_(f)(x))(Fay$$_(Fay$$_(Fay$$_(Prelude.foldr)(f))(z))(xs));
+        }
+        throw ["unhandled case in foldr",[$p1,$p2,$p3]];
+      });
+    };
+  };
+};
+Prelude.foldr1 = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$listLen(Fay$$_($p2),1)) {
+        var x = Fay$$index(0,Fay$$_($p2));
+        return x;
+      }
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var f = $p1;
+        return Fay$$_(Fay$$_(f)(x))(Fay$$_(Fay$$_(Prelude.foldr1)(f))(xs));
+      }
+      if (Fay$$_($p2) === null) {
+        return Fay$$_(Prelude.error)(Fay$$list("foldr1: empty list"));
+      }
+      throw ["unhandled case in foldr1",[$p1,$p2]];
+    });
+  };
+};
+Prelude.foldl = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        if (Fay$$_($p3) === null) {
+          var z = $p2;
+          return z;
+        }
+        var $tmp1 = Fay$$_($p3);
+        if ($tmp1 instanceof Fay$$Cons) {
+          var x = $tmp1.car;
+          var xs = $tmp1.cdr;
+          var z = $p2;
+          var f = $p1;
+          return Fay$$_(Fay$$_(Fay$$_(Prelude.foldl)(f))(Fay$$_(Fay$$_(f)(z))(x)))(xs);
+        }
+        throw ["unhandled case in foldl",[$p1,$p2,$p3]];
+      });
+    };
+  };
+};
+Prelude.foldl1 = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var f = $p1;
+        return Fay$$_(Fay$$_(Fay$$_(Prelude.foldl)(f))(x))(xs);
+      }
+      if (Fay$$_($p2) === null) {
+        return Fay$$_(Prelude.error)(Fay$$list("foldl1: empty list"));
+      }
+      throw ["unhandled case in foldl1",[$p1,$p2]];
+    });
+  };
+};
+Prelude.$43$$43$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var y = $p2;
+      var x = $p1;
+      return Fay$$_(Fay$$_(Prelude.conc)(x))(y);
+    });
+  };
+};
+Prelude.$33$$33$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var b = $p2;
+      var a = $p1;
+      return (function(){
+        var go = function($p1){
+          return function($p2){
+            return new Fay$$$(function(){
+              if (Fay$$_($p1) === null) {
+                return Fay$$_(Prelude.error)(Fay$$list("(!!): index too large"));
+              }
+              if (Fay$$_($p2) === 0) {
+                var $tmp1 = Fay$$_($p1);
+                if ($tmp1 instanceof Fay$$Cons) {
+                  var h = $tmp1.car;
+                  return h;
+                }
+              }
+              var n = $p2;
+              var $tmp1 = Fay$$_($p1);
+              if ($tmp1 instanceof Fay$$Cons) {
+                var t = $tmp1.cdr;
+                return Fay$$_(Fay$$_(go)(t))(Fay$$_(Fay$$_(Fay$$sub)(n))(1));
+              }
+              throw ["unhandled case in go",[$p1,$p2]];
+            });
+          };
+        };
+        return Fay$$_(Fay$$_(Fay$$_(Fay$$lt)(b))(0)) ? Fay$$_(Prelude.error)(Fay$$list("(!!): negative index")) : Fay$$_(Fay$$_(go)(a))(b);
+      })();
+    });
+  };
+};
+Prelude.head = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) === null) {
+      return Fay$$_(Prelude.error)(Fay$$list("head: empty list"));
+    }
+    var $tmp1 = Fay$$_($p1);
+    if ($tmp1 instanceof Fay$$Cons) {
+      var h = $tmp1.car;
+      return h;
+    }
+    throw ["unhandled case in head",[$p1]];
+  });
+};
+Prelude.tail = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) === null) {
+      return Fay$$_(Prelude.error)(Fay$$list("tail: empty list"));
+    }
+    var $tmp1 = Fay$$_($p1);
+    if ($tmp1 instanceof Fay$$Cons) {
+      var t = $tmp1.cdr;
+      return t;
+    }
+    throw ["unhandled case in tail",[$p1]];
+  });
+};
+Prelude.init = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) === null) {
+      return Fay$$_(Prelude.error)(Fay$$list("init: empty list"));
+    }
+    if (Fay$$listLen(Fay$$_($p1),1)) {
+      var a = Fay$$index(0,Fay$$_($p1));
+      return null;
+    }
+    var $tmp1 = Fay$$_($p1);
+    if ($tmp1 instanceof Fay$$Cons) {
+      var h = $tmp1.car;
+      var t = $tmp1.cdr;
+      return Fay$$_(Fay$$_(Fay$$cons)(h))(Fay$$_(Prelude.init)(t));
+    }
+    throw ["unhandled case in init",[$p1]];
+  });
+};
+Prelude.last = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) === null) {
+      return Fay$$_(Prelude.error)(Fay$$list("last: empty list"));
+    }
+    if (Fay$$listLen(Fay$$_($p1),1)) {
+      var a = Fay$$index(0,Fay$$_($p1));
+      return a;
+    }
+    var $tmp1 = Fay$$_($p1);
+    if ($tmp1 instanceof Fay$$Cons) {
+      var t = $tmp1.cdr;
+      return Fay$$_(Prelude.last)(t);
+    }
+    throw ["unhandled case in last",[$p1]];
+  });
+};
+Prelude.iterate = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var x = $p2;
+      var f = $p1;
+      return Fay$$_(Fay$$_(Fay$$cons)(x))(Fay$$_(Fay$$_(Prelude.iterate)(f))(Fay$$_(f)(x)));
+    });
+  };
+};
+Prelude.repeat = function($p1){
+  return new Fay$$$(function(){
+    var x = $p1;
+    return Fay$$_(Fay$$_(Fay$$cons)(x))(Fay$$_(Prelude.repeat)(x));
+  });
+};
+Prelude.replicate = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p1) === 0) {
+        return null;
+      }
+      var x = $p2;
+      var n = $p1;
+      return Fay$$_(Fay$$_(Fay$$_(Fay$$lt)(n))(0)) ? null : Fay$$_(Fay$$_(Fay$$cons)(x))(Fay$$_(Fay$$_(Prelude.replicate)(Fay$$_(Fay$$_(Fay$$sub)(n))(1)))(x));
+    });
+  };
+};
+Prelude.cycle = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) === null) {
+      return Fay$$_(Prelude.error)(Fay$$list("cycle: empty list"));
+    }
+    var xs = $p1;
+    return (function(){
+      var xs$39$ = new Fay$$$(function(){
+        return Fay$$_(Fay$$_(Prelude.$43$$43$)(xs))(xs$39$);
+      });
+      return xs$39$;
+    })();
+  });
+};
+Prelude.take = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p1) === 0) {
+        return null;
+      }
+      if (Fay$$_($p2) === null) {
+        return null;
+      }
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var n = $p1;
+        return Fay$$_(Fay$$_(Fay$$_(Fay$$lt)(n))(0)) ? null : Fay$$_(Fay$$_(Fay$$cons)(x))(Fay$$_(Fay$$_(Prelude.take)(Fay$$_(Fay$$_(Fay$$sub)(n))(1)))(xs));
+      }
+      throw ["unhandled case in take",[$p1,$p2]];
+    });
+  };
+};
+Prelude.drop = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var xs = $p2;
+      if (Fay$$_($p1) === 0) {
+        return xs;
+      }
+      if (Fay$$_($p2) === null) {
+        return null;
+      }
+      var xss = $p2;
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var n = $p1;
+        return Fay$$_(Fay$$_(Fay$$_(Fay$$lt)(n))(0)) ? xss : Fay$$_(Fay$$_(Prelude.drop)(Fay$$_(Fay$$_(Fay$$sub)(n))(1)))(xs);
+      }
+      throw ["unhandled case in drop",[$p1,$p2]];
+    });
+  };
+};
+Prelude.splitAt = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var xs = $p2;
+      if (Fay$$_($p1) === 0) {
+        return Fay$$list([null,xs]);
+      }
+      if (Fay$$_($p2) === null) {
+        return Fay$$list([null,null]);
+      }
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var n = $p1;
+        return Fay$$_(Fay$$_(Fay$$_(Fay$$lt)(n))(0)) ? Fay$$list([null,Fay$$_(Fay$$_(Fay$$cons)(x))(xs)]) : (function($tmp1){
+          if (Fay$$listLen(Fay$$_($tmp1),2)) {
+            var a = Fay$$index(0,Fay$$_($tmp1));
+            var b = Fay$$index(1,Fay$$_($tmp1));
+            return Fay$$list([Fay$$_(Fay$$_(Fay$$cons)(x))(a),b]);
+          }
+          return (function(){ throw (["unhandled case",$tmp1]); })();
+        })(Fay$$_(Fay$$_(Prelude.splitAt)(Fay$$_(Fay$$_(Fay$$sub)(n))(1)))(xs));
+      }
+      throw ["unhandled case in splitAt",[$p1,$p2]];
+    });
+  };
+};
+Prelude.takeWhile = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p2) === null) {
+        return null;
+      }
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var p = $p1;
+        return Fay$$_(Fay$$_(p)(x)) ? Fay$$_(Fay$$_(Fay$$cons)(x))(Fay$$_(Fay$$_(Prelude.takeWhile)(p))(xs)) : null;
+      }
+      throw ["unhandled case in takeWhile",[$p1,$p2]];
+    });
+  };
+};
+Prelude.dropWhile = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p2) === null) {
+        return null;
+      }
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var p = $p1;
+        return Fay$$_(Fay$$_(p)(x)) ? Fay$$_(Fay$$_(Prelude.dropWhile)(p))(xs) : Fay$$_(Fay$$_(Fay$$cons)(x))(xs);
+      }
+      throw ["unhandled case in dropWhile",[$p1,$p2]];
+    });
+  };
+};
+Prelude.span = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p2) === null) {
+        return Fay$$list([null,null]);
+      }
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var p = $p1;
+        return Fay$$_(Fay$$_(p)(x)) ? (function($tmp1){
+          if (Fay$$listLen(Fay$$_($tmp1),2)) {
+            var a = Fay$$index(0,Fay$$_($tmp1));
+            var b = Fay$$index(1,Fay$$_($tmp1));
+            return Fay$$list([Fay$$_(Fay$$_(Fay$$cons)(x))(a),b]);
+          }
+          return (function(){ throw (["unhandled case",$tmp1]); })();
+        })(Fay$$_(Fay$$_(Prelude.span)(p))(xs)) : Fay$$list([null,Fay$$_(Fay$$_(Fay$$cons)(x))(xs)]);
+      }
+      throw ["unhandled case in span",[$p1,$p2]];
+    });
+  };
+};
+Prelude.$_break = function($p1){
+  return new Fay$$$(function(){
+    var p = $p1;
+    return Fay$$_(Prelude.span)(Fay$$_(Fay$$_(Prelude.$46$)(Prelude.not))(p));
+  });
+};
+Prelude.zipWith = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var $tmp1 = Fay$$_($p3);
+        if ($tmp1 instanceof Fay$$Cons) {
+          var b = $tmp1.car;
+          var bs = $tmp1.cdr;
+          var $tmp1 = Fay$$_($p2);
+          if ($tmp1 instanceof Fay$$Cons) {
+            var a = $tmp1.car;
+            var as = $tmp1.cdr;
+            var f = $p1;
+            return Fay$$_(Fay$$_(Fay$$cons)(Fay$$_(Fay$$_(f)(a))(b)))(Fay$$_(Fay$$_(Fay$$_(Prelude.zipWith)(f))(as))(bs));
+          }
+        }
+        return null;
+      });
+    };
+  };
+};
+Prelude.zipWith3 = function($p1){
+  return function($p2){
+    return function($p3){
+      return function($p4){
+        return new Fay$$$(function(){
+          var $tmp1 = Fay$$_($p4);
+          if ($tmp1 instanceof Fay$$Cons) {
+            var c = $tmp1.car;
+            var cs = $tmp1.cdr;
+            var $tmp1 = Fay$$_($p3);
+            if ($tmp1 instanceof Fay$$Cons) {
+              var b = $tmp1.car;
+              var bs = $tmp1.cdr;
+              var $tmp1 = Fay$$_($p2);
+              if ($tmp1 instanceof Fay$$Cons) {
+                var a = $tmp1.car;
+                var as = $tmp1.cdr;
+                var f = $p1;
+                return Fay$$_(Fay$$_(Fay$$cons)(Fay$$_(Fay$$_(Fay$$_(f)(a))(b))(c)))(Fay$$_(Fay$$_(Fay$$_(Fay$$_(Prelude.zipWith3)(f))(as))(bs))(cs));
+              }
+            }
+          }
+          return null;
+        });
+      };
+    };
+  };
+};
+Prelude.zip = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var b = $tmp1.car;
+        var bs = $tmp1.cdr;
+        var $tmp1 = Fay$$_($p1);
+        if ($tmp1 instanceof Fay$$Cons) {
+          var a = $tmp1.car;
+          var as = $tmp1.cdr;
+          return Fay$$_(Fay$$_(Fay$$cons)(Fay$$list([a,b])))(Fay$$_(Fay$$_(Prelude.zip)(as))(bs));
+        }
+      }
+      return null;
+    });
+  };
+};
+Prelude.zip3 = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var $tmp1 = Fay$$_($p3);
+        if ($tmp1 instanceof Fay$$Cons) {
+          var c = $tmp1.car;
+          var cs = $tmp1.cdr;
+          var $tmp1 = Fay$$_($p2);
+          if ($tmp1 instanceof Fay$$Cons) {
+            var b = $tmp1.car;
+            var bs = $tmp1.cdr;
+            var $tmp1 = Fay$$_($p1);
+            if ($tmp1 instanceof Fay$$Cons) {
+              var a = $tmp1.car;
+              var as = $tmp1.cdr;
+              return Fay$$_(Fay$$_(Fay$$cons)(Fay$$list([a,b,c])))(Fay$$_(Fay$$_(Fay$$_(Prelude.zip3)(as))(bs))(cs));
+            }
+          }
+        }
+        return null;
+      });
+    };
+  };
+};
+Prelude.unzip = function($p1){
+  return new Fay$$$(function(){
+    var $tmp1 = Fay$$_($p1);
+    if ($tmp1 instanceof Fay$$Cons) {
+      if (Fay$$listLen(Fay$$_($tmp1.car),2)) {
+        var x = Fay$$index(0,Fay$$_($tmp1.car));
+        var y = Fay$$index(1,Fay$$_($tmp1.car));
+        var ps = $tmp1.cdr;
+        return (function($tmp1){
+          if (Fay$$listLen(Fay$$_($tmp1),2)) {
+            var xs = Fay$$index(0,Fay$$_($tmp1));
+            var ys = Fay$$index(1,Fay$$_($tmp1));
+            return Fay$$list([Fay$$_(Fay$$_(Fay$$cons)(x))(xs),Fay$$_(Fay$$_(Fay$$cons)(y))(ys)]);
+          }
+          return (function(){ throw (["unhandled case",$tmp1]); })();
+        })(Fay$$_(Prelude.unzip)(ps));
+      }
+    }
+    if (Fay$$_($p1) === null) {
+      return Fay$$list([null,null]);
+    }
+    throw ["unhandled case in unzip",[$p1]];
+  });
+};
+Prelude.unzip3 = function($p1){
+  return new Fay$$$(function(){
+    var $tmp1 = Fay$$_($p1);
+    if ($tmp1 instanceof Fay$$Cons) {
+      if (Fay$$listLen(Fay$$_($tmp1.car),3)) {
+        var x = Fay$$index(0,Fay$$_($tmp1.car));
+        var y = Fay$$index(1,Fay$$_($tmp1.car));
+        var z = Fay$$index(2,Fay$$_($tmp1.car));
+        var ps = $tmp1.cdr;
+        return (function($tmp1){
+          if (Fay$$listLen(Fay$$_($tmp1),3)) {
+            var xs = Fay$$index(0,Fay$$_($tmp1));
+            var ys = Fay$$index(1,Fay$$_($tmp1));
+            var zs = Fay$$index(2,Fay$$_($tmp1));
+            return Fay$$list([Fay$$_(Fay$$_(Fay$$cons)(x))(xs),Fay$$_(Fay$$_(Fay$$cons)(y))(ys),Fay$$_(Fay$$_(Fay$$cons)(z))(zs)]);
+          }
+          return (function(){ throw (["unhandled case",$tmp1]); })();
+        })(Fay$$_(Prelude.unzip3)(ps));
+      }
+    }
+    if (Fay$$_($p1) === null) {
+      return Fay$$list([null,null,null]);
+    }
+    throw ["unhandled case in unzip3",[$p1]];
+  });
+};
+Prelude.lines = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) === null) {
+      return null;
+    }
+    var s = $p1;
+    return (function(){
+      var isLineBreak = function($p1){
+        return new Fay$$$(function(){
+          var c = $p1;
+          return Fay$$_(Fay$$_(Fay$$or)(Fay$$_(Fay$$_(Fay$$eq)(c))("\r")))(Fay$$_(Fay$$_(Fay$$eq)(c))("\n"));
+        });
+      };
+      return (function($tmp1){
+        if (Fay$$listLen(Fay$$_($tmp1),2)) {
+          var a = Fay$$index(0,Fay$$_($tmp1));
+          if (Fay$$_(Fay$$index(1,Fay$$_($tmp1))) === null) {
+            return Fay$$list([a]);
+          }
+        }
+        if (Fay$$listLen(Fay$$_($tmp1),2)) {
+          var a = Fay$$index(0,Fay$$_($tmp1));
+          var $tmp2 = Fay$$_(Fay$$index(1,Fay$$_($tmp1)));
+          if ($tmp2 instanceof Fay$$Cons) {
+            var cs = $tmp2.cdr;
+            return Fay$$_(Fay$$_(Fay$$cons)(a))(Fay$$_(Prelude.lines)(cs));
+          }
+        }
+        return (function(){ throw (["unhandled case",$tmp1]); })();
+      })(Fay$$_(Fay$$_(Prelude.$_break)(isLineBreak))(s));
+    })();
+  });
+};
+Prelude.unlines = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) === null) {
+      return null;
+    }
+    var $tmp1 = Fay$$_($p1);
+    if ($tmp1 instanceof Fay$$Cons) {
+      var l = $tmp1.car;
+      var ls = $tmp1.cdr;
+      return Fay$$_(Fay$$_(Prelude.$43$$43$)(l))(Fay$$_(Fay$$_(Fay$$cons)("\n"))(Fay$$_(Prelude.unlines)(ls)));
+    }
+    throw ["unhandled case in unlines",[$p1]];
+  });
+};
+Prelude.words = function($p1){
+  return new Fay$$$(function(){
+    var str = $p1;
+    return (function(){
+      var words$39$ = function($p1){
+        return new Fay$$$(function(){
+          if (Fay$$_($p1) === null) {
+            return null;
+          }
+          var s = $p1;
+          return (function($tmp1){
+            if (Fay$$listLen(Fay$$_($tmp1),2)) {
+              var a = Fay$$index(0,Fay$$_($tmp1));
+              var b = Fay$$index(1,Fay$$_($tmp1));
+              return Fay$$_(Fay$$_(Fay$$cons)(a))(Fay$$_(Prelude.words)(b));
+            }
+            return (function(){ throw (["unhandled case",$tmp1]); })();
+          })(Fay$$_(Fay$$_(Prelude.$_break)(isSpace))(s));
+        });
+      };
+      var isSpace = function($p1){
+        return new Fay$$$(function(){
+          var c = $p1;
+          return Fay$$_(Fay$$_(Prelude.elem)(c))(Fay$$list(" \t\r\n\u000c\u000b"));
+        });
+      };
+      return Fay$$_(words$39$)(Fay$$_(Fay$$_(Prelude.dropWhile)(isSpace))(str));
+    })();
+  });
+};
+Prelude.unwords = new Fay$$$(function(){
+  return Fay$$_(Prelude.intercalate)(Fay$$list(" "));
+});
+Prelude.and = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) === null) {
+      return true;
+    }
+    var $tmp1 = Fay$$_($p1);
+    if ($tmp1 instanceof Fay$$Cons) {
+      var x = $tmp1.car;
+      var xs = $tmp1.cdr;
+      return Fay$$_(Fay$$_(Fay$$and)(x))(Fay$$_(Prelude.and)(xs));
+    }
+    throw ["unhandled case in and",[$p1]];
+  });
+};
+Prelude.or = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) === null) {
+      return false;
+    }
+    var $tmp1 = Fay$$_($p1);
+    if ($tmp1 instanceof Fay$$Cons) {
+      var x = $tmp1.car;
+      var xs = $tmp1.cdr;
+      return Fay$$_(Fay$$_(Fay$$or)(x))(Fay$$_(Prelude.or)(xs));
+    }
+    throw ["unhandled case in or",[$p1]];
+  });
+};
+Prelude.any = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p2) === null) {
+        return false;
+      }
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var p = $p1;
+        return Fay$$_(Fay$$_(Fay$$or)(Fay$$_(p)(x)))(Fay$$_(Fay$$_(Prelude.any)(p))(xs));
+      }
+      throw ["unhandled case in any",[$p1,$p2]];
+    });
+  };
+};
+Prelude.all = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p2) === null) {
+        return true;
+      }
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var p = $p1;
+        return Fay$$_(Fay$$_(Fay$$and)(Fay$$_(p)(x)))(Fay$$_(Fay$$_(Prelude.all)(p))(xs));
+      }
+      throw ["unhandled case in all",[$p1,$p2]];
+    });
+  };
+};
+Prelude.intersperse = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p2) === null) {
+        return null;
+      }
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var sep = $p1;
+        return Fay$$_(Fay$$_(Fay$$cons)(x))(Fay$$_(Fay$$_(Prelude.prependToAll)(sep))(xs));
+      }
+      throw ["unhandled case in intersperse",[$p1,$p2]];
+    });
+  };
+};
+Prelude.prependToAll = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p2) === null) {
+        return null;
+      }
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var sep = $p1;
+        return Fay$$_(Fay$$_(Fay$$cons)(sep))(Fay$$_(Fay$$_(Fay$$cons)(x))(Fay$$_(Fay$$_(Prelude.prependToAll)(sep))(xs)));
+      }
+      throw ["unhandled case in prependToAll",[$p1,$p2]];
+    });
+  };
+};
+Prelude.intercalate = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var xss = $p2;
+      var xs = $p1;
+      return Fay$$_(Prelude.concat)(Fay$$_(Fay$$_(Prelude.intersperse)(xs))(xss));
+    });
+  };
+};
+Prelude.maximum = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) === null) {
+      return Fay$$_(Prelude.error)(Fay$$list("maximum: empty list"));
+    }
+    var xs = $p1;
+    return Fay$$_(Fay$$_(Prelude.foldl1)(Prelude.max))(xs);
+  });
+};
+Prelude.minimum = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) === null) {
+      return Fay$$_(Prelude.error)(Fay$$list("minimum: empty list"));
+    }
+    var xs = $p1;
+    return Fay$$_(Fay$$_(Prelude.foldl1)(Prelude.min))(xs);
+  });
+};
+Prelude.product = function($p1){
+  return new Fay$$$(function(){
+    var xs = $p1;
+    return Fay$$_(Fay$$_(Fay$$_(Prelude.foldl)(Fay$$mult))(1))(xs);
+  });
+};
+Prelude.sum = function($p1){
+  return new Fay$$$(function(){
+    var xs = $p1;
+    return Fay$$_(Fay$$_(Fay$$_(Prelude.foldl)(Fay$$add))(0))(xs);
+  });
+};
+Prelude.scanl = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var l = $p3;
+        var z = $p2;
+        var f = $p1;
+        return Fay$$_(Fay$$_(Fay$$cons)(z))((function($tmp1){
+          if (Fay$$_($tmp1) === null) {
+            return null;
+          }
+          var $tmp2 = Fay$$_($tmp1);
+          if ($tmp2 instanceof Fay$$Cons) {
+            var x = $tmp2.car;
+            var xs = $tmp2.cdr;
+            return Fay$$_(Fay$$_(Fay$$_(Prelude.scanl)(f))(Fay$$_(Fay$$_(f)(z))(x)))(xs);
+          }
+          return (function(){ throw (["unhandled case",$tmp1]); })();
+        })(l));
+      });
+    };
+  };
+};
+Prelude.scanl1 = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p2) === null) {
+        return null;
+      }
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var f = $p1;
+        return Fay$$_(Fay$$_(Fay$$_(Prelude.scanl)(f))(x))(xs);
+      }
+      throw ["unhandled case in scanl1",[$p1,$p2]];
+    });
+  };
+};
+Prelude.scanr = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        if (Fay$$_($p3) === null) {
+          var z = $p2;
+          return Fay$$list([z]);
+        }
+        var $tmp1 = Fay$$_($p3);
+        if ($tmp1 instanceof Fay$$Cons) {
+          var x = $tmp1.car;
+          var xs = $tmp1.cdr;
+          var z = $p2;
+          var f = $p1;
+          return (function($tmp1){
+            var $tmp2 = Fay$$_($tmp1);
+            if ($tmp2 instanceof Fay$$Cons) {
+              var h = $tmp2.car;
+              var t = $tmp2.cdr;
+              return Fay$$_(Fay$$_(Fay$$cons)(Fay$$_(Fay$$_(f)(x))(h)))(Fay$$_(Fay$$_(Fay$$cons)(h))(t));
+            }
+            return Prelude.$_undefined;
+          })(Fay$$_(Fay$$_(Fay$$_(Prelude.scanr)(f))(z))(xs));
+        }
+        throw ["unhandled case in scanr",[$p1,$p2,$p3]];
+      });
+    };
+  };
+};
+Prelude.scanr1 = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p2) === null) {
+        return null;
+      }
+      if (Fay$$listLen(Fay$$_($p2),1)) {
+        var x = Fay$$index(0,Fay$$_($p2));
+        return Fay$$list([x]);
+      }
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var x = $tmp1.car;
+        var xs = $tmp1.cdr;
+        var f = $p1;
+        return (function($tmp1){
+          var $tmp2 = Fay$$_($tmp1);
+          if ($tmp2 instanceof Fay$$Cons) {
+            var h = $tmp2.car;
+            var t = $tmp2.cdr;
+            return Fay$$_(Fay$$_(Fay$$cons)(Fay$$_(Fay$$_(f)(x))(h)))(Fay$$_(Fay$$_(Fay$$cons)(h))(t));
+          }
+          return Prelude.$_undefined;
+        })(Fay$$_(Fay$$_(Prelude.scanr1)(f))(xs));
+      }
+      throw ["unhandled case in scanr1",[$p1,$p2]];
+    });
+  };
+};
+Prelude.lookup = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      if (Fay$$_($p2) === null) {
+        var _key = $p1;
+        return Prelude.Nothing;
+      }
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        if (Fay$$listLen(Fay$$_($tmp1.car),2)) {
+          var x = Fay$$index(0,Fay$$_($tmp1.car));
+          var y = Fay$$index(1,Fay$$_($tmp1.car));
+          var xys = $tmp1.cdr;
+          var key = $p1;
+          return Fay$$_(Fay$$_(Fay$$_(Fay$$eq)(key))(x)) ? Fay$$_(Prelude.Just)(y) : Fay$$_(Fay$$_(Prelude.lookup)(key))(xys);
+        }
+      }
+      throw ["unhandled case in lookup",[$p1,$p2]];
+    });
+  };
+};
+Prelude.length = function($p1){
+  return new Fay$$$(function(){
+    var xs = $p1;
+    return Fay$$_(Fay$$_(Prelude.length$39$)(0))(xs);
+  });
+};
+Prelude.length$39$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var $tmp1 = Fay$$_($p2);
+      if ($tmp1 instanceof Fay$$Cons) {
+        var xs = $tmp1.cdr;
+        var acc = $p1;
+        return Fay$$_(Fay$$_(Prelude.length$39$)(Fay$$_(Fay$$_(Fay$$add)(acc))(1)))(xs);
+      }
+      var acc = $p1;
+      return acc;
+    });
+  };
+};
+Prelude.reverse = function($p1){
+  return new Fay$$$(function(){
+    var $tmp1 = Fay$$_($p1);
+    if ($tmp1 instanceof Fay$$Cons) {
+      var x = $tmp1.car;
+      var xs = $tmp1.cdr;
+      return Fay$$_(Fay$$_(Prelude.$43$$43$)(Fay$$_(Prelude.reverse)(xs)))(Fay$$list([x]));
+    }
+    if (Fay$$_($p1) === null) {
+      return null;
+    }
+    throw ["unhandled case in reverse",[$p1]];
+  });
+};
+Prelude.print = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"],(function(x) { if (console && console.log) console.log(x) })(Fay$$fayToJs(["automatic"],$p1))));
+  });
+};
+Prelude.putStrLn = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"],(function(x) { if (console && console.log) console.log(x) })(Fay$$fayToJs_string($p1))));
+  });
+};
+Prelude.ifThenElse = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var b = $p3;
+        var a = $p2;
+        var p = $p1;
+        return Fay$$_(p) ? a : b;
+      });
+    };
+  };
+};
+Fay$$objConcat(Fay$$fayToJsHash,{"Just": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Just"};
+  var obj_slot1 = Fay$$fayToJs(argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"],_obj.slot1);
+  if (undefined !== obj_slot1) {
+    obj_['slot1'] = obj_slot1;
+  }
+  return obj_;
+},"Nothing": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Nothing"};
+  return obj_;
+},"Left": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Left"};
+  var obj_slot1 = Fay$$fayToJs(argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"],_obj.slot1);
+  if (undefined !== obj_slot1) {
+    obj_['slot1'] = obj_slot1;
+  }
+  return obj_;
+},"Right": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Right"};
+  var obj_slot1 = Fay$$fayToJs(argTypes && (argTypes)[1] ? (argTypes)[1] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"],_obj.slot1);
+  if (undefined !== obj_slot1) {
+    obj_['slot1'] = obj_slot1;
+  }
+  return obj_;
+},"GT": function(type,argTypes,_obj){
+  var obj_ = {"instance": "GT"};
+  return obj_;
+},"LT": function(type,argTypes,_obj){
+  var obj_ = {"instance": "LT"};
+  return obj_;
+},"EQ": function(type,argTypes,_obj){
+  var obj_ = {"instance": "EQ"};
+  return obj_;
+}});
+Fay$$objConcat(Fay$$jsToFayHash,{"Just": function(type,argTypes,obj){
+  return new Prelude._Just(Fay$$jsToFay(argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"],obj["slot1"]));
+},"Nothing": function(type,argTypes,obj){
+  return new Prelude._Nothing();
+},"Left": function(type,argTypes,obj){
+  return new Prelude._Left(Fay$$jsToFay(argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"],obj["slot1"]));
+},"Right": function(type,argTypes,obj){
+  return new Prelude._Right(Fay$$jsToFay(argTypes && (argTypes)[1] ? (argTypes)[1] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"],obj["slot1"]));
+},"GT": function(type,argTypes,obj){
+  return new Prelude._GT();
+},"LT": function(type,argTypes,obj){
+  return new Prelude._LT();
+},"EQ": function(type,argTypes,obj){
+  return new Prelude._EQ();
+}});
+var FFI = {};
+Data.Nullable = {};
+Data.Nullable.fromNullable = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) instanceof Fay.FFI._Nullable) {
+      var x = Fay$$_($p1).slot1;
+      return Fay$$_(Prelude.Just)(x);
+    }
+    if (Fay$$_($p1) instanceof Fay.FFI._Null) {
+      return Prelude.Nothing;
+    }
+    throw ["unhandled case in fromNullable",[$p1]];
+  });
+};
+Data.Nullable.toNullable = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) instanceof Prelude._Just) {
+      var x = Fay$$_($p1).slot1;
+      return Fay$$_(Fay.FFI.Nullable)(x);
+    }
+    if (Fay$$_($p1) instanceof Prelude._Nothing) {
+      return Fay.FFI.Null;
+    }
+    throw ["unhandled case in toNullable",[$p1]];
+  });
+};
+Data.Text = {};
+Data.Text.intercalate = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["list",[["user","Text",[]]]],$p2).join(Fay$$fayToJs(["user","Text",[]],$p1)));
+    });
+  };
+};
+Data.Text.fromString = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs_string($p1));
+  });
+};
+Data.Text.snoc = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","Text",[]],$p1) + Fay$$fayToJs(["user","Char",[]],$p2));
+    });
+  };
+};
+Data.Text.cons = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","Char",[]],$p1) + Fay$$fayToJs(["user","Text",[]],$p2));
+    });
+  };
+};
+Data.Text.pack = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs_string($p1));
+  });
+};
+Data.Text.unpack = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_string(Fay$$fayToJs(["user","Text",[]],$p1));
+  });
+};
+Data.Text.append = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","Text",[]],$p1) + Fay$$fayToJs(["user","Text",[]],$p2));
+    });
+  };
+};
+Data.Text.$60$$62$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","Text",[]],$p1) + Fay$$fayToJs(["user","Text",[]],$p2));
+    });
+  };
+};
+Data.Text.length = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_int(Fay$$fayToJs(["user","Text",[]],$p1).length);
+  });
+};
+Data.Text.$_null = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_bool(Fay$$fayToJs(["user","Text",[]],$p1).length == 0);
+  });
+};
+Data.Text.take = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","Text",[]],$p2).substring(0,Fay$$fayToJs_int($p1)));
+    });
+  };
+};
+Data.Text.drop = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","Text",[]],$p2).substring(Fay$$fayToJs_int($p1)));
+    });
+  };
+};
+Data.Text.empty = new Fay$$$(function(){
+  return Fay$$jsToFay(["user","Text",[]],"");
+});
+Data.Text.lines = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["list",[["user","Text",[]]]],Fay$$fayToJs(["user","Text",[]],$p1).split('\n'));
+  });
+};
+Data.Text.unlines = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["list",[["user","Text",[]]]],$p1).join('\n'));
+  });
+};
+Data.Text.isPrefixOf = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay_bool(Fay$$fayToJs(["user","Text",[]],$p2).lastIndexOf(Fay$$fayToJs(["user","Text",[]],$p1), 0) == 0);
+    });
+  };
+};
+Data.Text.intersperse = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","Text",[]],$p2).split('').join(Fay$$fayToJs(["user","Char",[]],$p1)));
+    });
+  };
+};
+Data.Text.reverse = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","Text",[]],$p1).split('').reverse().join(''));
+  });
+};
+Data.Text.stripSuffix = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var text = $p2;
+      var prefix = $p1;
+      return (function(){
+        var extract = function($p1){
+          return function($p2){
+            return new Fay$$$(function(){
+              return Fay$$jsToFay(["nullable",[["user","Text",[]]]],(function(suffix,text){ return text.substring(text.length - suffix.length) == suffix? text.substring(0,text.length - suffix.length) : null; })(Fay$$fayToJs(["user","Text",[]],$p1),Fay$$fayToJs(["user","Text",[]],$p2)));
+            });
+          };
+        };
+        return Fay$$_(Data.Nullable.fromNullable)(Fay$$_(Fay$$_(extract)(prefix))(text));
+      })();
+    });
+  };
+};
+Data.Text.splitOn = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["list",[["user","Text",[]]]],Fay$$fayToJs(["user","Text",[]],$p2).split(Fay$$fayToJs(["user","Char",[]],$p1)));
+    });
+  };
+};
+Data.Text.putStrLn = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"],console.log('%s',Fay$$fayToJs(["user","Text",[]],$p1))));
+  });
+};
+Data.Text.toShortest = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs_double($p1).toString());
+  });
+};
+Data.Text.showInt = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs_int($p1).toString());
+  });
+};
+Data.Text.uncons = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Maybe",[["tuple",[["user","Char",[]],["user","Text",[]]]]]],Fay$$fayToJs(["user","Text",[]],$p1)[0] ? { instance: 'Just', slot1 : [Fay$$fayToJs(["user","Text",[]],$p1)[0],Fay$$fayToJs(["user","Text",[]],$p1).slice(1)] } : { instance : 'Nothing' });
+  });
+};
+Data.Text.head = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Char",[]],Fay$$fayToJs(["user","Text",[]],$p1)[0] || (function () {throw new Error('Data.Text.head: empty Text'); }()));
+  });
+};
+Data.Text.last = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Char",[]],Fay$$fayToJs(["user","Text",[]],$p1).length ? Fay$$fayToJs(["user","Text",[]],$p1)[Fay$$fayToJs(["user","Text",[]],$p1).length-1] : (function() { throw new Error('Data.Text.last: empty Text') })());
+  });
+};
+Data.Text.tail = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","Text",[]],$p1).length ? Fay$$fayToJs(["user","Text",[]],$p1).slice(1) : (function () { throw new Error('Data.Text.tail: empty Text') })());
+  });
+};
+Data.Text.init = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","Text",[]],$p1).length ? Fay$$fayToJs(["user","Text",[]],$p1).slice(0,-1) : (function () { throw new Error('Data.Text.init: empty Text') })());
+  });
+};
+Data.Text.map = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["user","Text",[]],[].map.call(Fay$$fayToJs(["user","Text",[]],$p2), Fay$$fayToJs(["function",[["user","Char",[]],["user","Char",[]]]],$p1)).join(''));
+    });
+  };
+};
+Data.Text.toLower = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","Text",[]],$p1).toLowerCase());
+  });
+};
+Data.Text.toUpper = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","Text",[]],$p1).toUpperCase());
+  });
+};
+Data.Text.concat = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["list",[["user","Text",[]]]],$p1).join(''));
+  });
+};
+Data.Text.concatMap = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["user","Text",[]],[].map.call(Fay$$fayToJs(["user","Text",[]],$p2), Fay$$fayToJs(["function",[["user","Char",[]],["user","Text",[]]]],$p1)).join(''));
+    });
+  };
+};
+Data.Text.any = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay_bool([].filter.call(Fay$$fayToJs(["user","Text",[]],$p2), Fay$$fayToJs(["function",[["user","Char",[]],["bool"]]],$p1)).length > 0);
+    });
+  };
+};
+Data.Text.all = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay_bool([].filter.call(Fay$$fayToJs(["user","Text",[]],$p2), Fay$$fayToJs(["function",[["user","Char",[]],["bool"]]],$p1)).length == Fay$$fayToJs(["function",[["user","Char",[]],["bool"]]],$p1).length);
+    });
+  };
+};
+Data.Text.maximum = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Char",[]],(function (s) {    if (s === '') { throw new Error('Data.Text.maximum: empty string'); }    var max = s[0];    for (var i = 1; i < s.length; s++) {      if (s[i] > max) { max = s[i]; }    }    return max;  })(Fay$$fayToJs(["user","Text",[]],$p1)));
+  });
+};
+Data.Text.minimum = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Char",[]],(function (s) {    if (s === '') { throw new Error('Data.Text.maximum: empty string'); }    var min = s[0];    for (var i = 1; i < s.length; s++) {      if (s[i] < min) { min = s[i]; }    }    return min;  })(Fay$$fayToJs(["user","Text",[]],$p1)));
+  });
+};
+Fay.Text = {};
+Fay.Text.Type = {};
+Fay.Text.Type.fromString = new Fay$$$(function(){
+  return Data.Text.pack;
+});
+Fay.Text.Type.pack = Data.Text.pack;
+Fay.Text.Type.unpack = Data.Text.unpack;
+Fay.Text.all = Data.Text.all;
+Fay.Text.any = Data.Text.any;
+Fay.Text.append = Data.Text.append;
+Fay.Text.concat = Data.Text.concat;
+Fay.Text.concatMap = Data.Text.concatMap;
+Fay.Text.cons = Data.Text.cons;
+Fay.Text.drop = Data.Text.drop;
+Fay.Text.empty = Data.Text.empty;
+Fay.Text.head = Data.Text.head;
+Fay.Text.init = Data.Text.init;
+Fay.Text.intercalate = Data.Text.intercalate;
+Fay.Text.intersperse = Data.Text.intersperse;
+Fay.Text.isPrefixOf = Data.Text.isPrefixOf;
+Fay.Text.last = Data.Text.last;
+Fay.Text.length = Data.Text.length;
+Fay.Text.lines = Data.Text.lines;
+Fay.Text.map = Data.Text.map;
+Fay.Text.maximum = Data.Text.maximum;
+Fay.Text.minimum = Data.Text.minimum;
+Fay.Text.$_null = Data.Text.$_null;
+Fay.Text.pack = Data.Text.pack;
+Fay.Text.reverse = Data.Text.reverse;
+Fay.Text.snoc = Data.Text.snoc;
+Fay.Text.splitOn = Data.Text.splitOn;
+Fay.Text.stripSuffix = Data.Text.stripSuffix;
+Fay.Text.tail = Data.Text.tail;
+Fay.Text.take = Data.Text.take;
+Fay.Text.toLower = Data.Text.toLower;
+Fay.Text.toUpper = Data.Text.toUpper;
+Fay.Text.uncons = Data.Text.uncons;
+Fay.Text.unlines = Data.Text.unlines;
+Fay.Text.unpack = Data.Text.unpack;
+var JQuery = {};
+JQuery.emptyCallback = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Prelude.$36$)(Prelude.$_const))(Fay$$_(Fay$$$_return)(Fay$$unit));
+});
+JQuery.ajax = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var err = $p3;
+        var succ = $p2;
+        var ur = $p1;
+        return Fay$$_(Fay$$_(Prelude.$36$)(JQuery.ajax$39$))((function(){
+          var $36$_record_to_update = Object.create(Fay$$_(JQuery.defaultAjaxSettings));
+          $36$_record_to_update.success = Fay$$_(Fay.FFI.Defined)(succ);
+          $36$_record_to_update.data$39$ = Fay.FFI.Undefined;
+          $36$_record_to_update.error$39$ = Fay$$_(Fay.FFI.Defined)(err);
+          $36$_record_to_update.url = Fay$$_(Fay.FFI.Defined)(ur);
+          return $36$_record_to_update;
+        })());
+      });
+    };
+  };
+};
+JQuery.ajaxPost = function($p1){
+  return function($p2){
+    return function($p3){
+      return function($p4){
+        return new Fay$$$(function(){
+          var err = $p4;
+          var succ = $p3;
+          var dat = $p2;
+          var ur = $p1;
+          return Fay$$_(Fay$$_(Prelude.$36$)(JQuery.ajax$39$))((function(){
+            var $36$_record_to_update = Object.create(Fay$$_(JQuery.defaultAjaxSettings));
+            $36$_record_to_update.success = Fay$$_(Fay.FFI.Defined)(succ);
+            $36$_record_to_update.data$39$ = Fay$$_(Fay.FFI.Defined)(dat);
+            $36$_record_to_update.error$39$ = Fay$$_(Fay.FFI.Defined)(err);
+            $36$_record_to_update.url = Fay$$_(Fay.FFI.Defined)(ur);
+            $36$_record_to_update.type$39$ = Fay$$_(Fay.FFI.Defined)("POST");
+            $36$_record_to_update.processData = Fay$$_(Fay.FFI.Defined)(false);
+            $36$_record_to_update.contentType = Fay$$_(Fay.FFI.Defined)("text/json");
+            $36$_record_to_update.dataType = Fay$$_(Fay.FFI.Defined)("json");
+            return $36$_record_to_update;
+          })());
+        });
+      };
+    };
+  };
+};
+JQuery.ajaxPostParam = function($p1){
+  return function($p2){
+    return function($p3){
+      return function($p4){
+        return function($p5){
+          return new Fay$$$(function(){
+            var err = $p5;
+            var succ = $p4;
+            var dat = $p3;
+            var rqparam = $p2;
+            var ur = $p1;
+            return Fay$$_(Fay$$_(Prelude.$36$)(JQuery.ajax$39$))((function(){
+              var $36$_record_to_update = Object.create(Fay$$_(JQuery.defaultAjaxSettings));
+              $36$_record_to_update.success = Fay$$_(Fay.FFI.Defined)(succ);
+              $36$_record_to_update.data$39$ = Fay$$_(Fay$$_(Prelude.$36$)(Fay.FFI.Defined))(Fay$$_(Fay$$_(JQuery.makeRqObj)(rqparam))(dat));
+              $36$_record_to_update.error$39$ = Fay$$_(Fay.FFI.Defined)(err);
+              $36$_record_to_update.url = Fay$$_(Fay.FFI.Defined)(ur);
+              $36$_record_to_update.type$39$ = Fay$$_(Fay.FFI.Defined)("POST");
+              $36$_record_to_update.processData = Fay$$_(Fay.FFI.Defined)(false);
+              $36$_record_to_update.contentType = Fay$$_(Fay.FFI.Defined)("text/json");
+              $36$_record_to_update.dataType = Fay$$_(Fay.FFI.Defined)("json");
+              return $36$_record_to_update;
+            })());
+          });
+        };
+      };
+    };
+  };
+};
+JQuery.makeRqObj = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["user","Object",[]],(function () { var o = {}; o[Fay$$fayToJs(["user","Text",[]],$p1)] = Fay$$fayToJs(["unknown"],$p2); return o; })());
+    });
+  };
+};
+JQuery._AjaxSettings = function AjaxSettings(accepts,async,beforeSend,cache,complete,contentType,crossDomain,data$39$,dataType,error$39$,$_global,ifModified,isLocal,mimeType,password,processData,success,timeout,type$39$,url,username){
+  this.accepts = accepts;
+  this.async = async;
+  this.beforeSend = beforeSend;
+  this.cache = cache;
+  this.complete = complete;
+  this.contentType = contentType;
+  this.crossDomain = crossDomain;
+  this.data$39$ = data$39$;
+  this.dataType = dataType;
+  this.error$39$ = error$39$;
+  this.$_global = $_global;
+  this.ifModified = ifModified;
+  this.isLocal = isLocal;
+  this.mimeType = mimeType;
+  this.password = password;
+  this.processData = processData;
+  this.success = success;
+  this.timeout = timeout;
+  this.type$39$ = type$39$;
+  this.url = url;
+  this.username = username;
+};
+JQuery._AjaxSettings.prototype.instance = "AjaxSettings";
+JQuery.AjaxSettings = function(accepts){
+  return function(async){
+    return function(beforeSend){
+      return function(cache){
+        return function(complete){
+          return function(contentType){
+            return function(crossDomain){
+              return function(data$39$){
+                return function(dataType){
+                  return function(error$39$){
+                    return function($_global){
+                      return function(ifModified){
+                        return function(isLocal){
+                          return function(mimeType){
+                            return function(password){
+                              return function(processData){
+                                return function(success){
+                                  return function(timeout){
+                                    return function(type$39$){
+                                      return function(url){
+                                        return function(username){
+                                          return new Fay$$$(function(){
+                                            return new JQuery._AjaxSettings(accepts,async,beforeSend,cache,complete,contentType,crossDomain,data$39$,dataType,error$39$,$_global,ifModified,isLocal,mimeType,password,processData,success,timeout,type$39$,url,username);
+                                          });
+                                        };
+                                      };
+                                    };
+                                  };
+                                };
+                              };
+                            };
+                          };
+                        };
+                      };
+                    };
+                  };
+                };
+              };
+            };
+          };
+        };
+      };
+    };
+  };
+};
+JQuery.accepts = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).accepts;
+  });
+};
+JQuery.async = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).async;
+  });
+};
+JQuery.beforeSend = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).beforeSend;
+  });
+};
+JQuery.cache = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).cache;
+  });
+};
+JQuery.complete = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).complete;
+  });
+};
+JQuery.contentType = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).contentType;
+  });
+};
+JQuery.crossDomain = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).crossDomain;
+  });
+};
+JQuery.data$39$ = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).data$39$;
+  });
+};
+JQuery.dataType = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).dataType;
+  });
+};
+JQuery.error$39$ = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).error$39$;
+  });
+};
+JQuery.$_global = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).$_global;
+  });
+};
+JQuery.ifModified = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).ifModified;
+  });
+};
+JQuery.isLocal = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).isLocal;
+  });
+};
+JQuery.mimeType = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).mimeType;
+  });
+};
+JQuery.password = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).password;
+  });
+};
+JQuery.processData = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).processData;
+  });
+};
+JQuery.success = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).success;
+  });
+};
+JQuery.timeout = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).timeout;
+  });
+};
+JQuery.type$39$ = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).type$39$;
+  });
+};
+JQuery.url = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).url;
+  });
+};
+JQuery.username = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).username;
+  });
+};
+JQuery.defaultAjaxSettings = new Fay$$$(function(){
+  var _ajaxSettings = new JQuery._AjaxSettings();
+  _ajaxSettings.accepts = Fay.FFI.Undefined;
+  _ajaxSettings.async = Fay.FFI.Undefined;
+  _ajaxSettings.beforeSend = Fay.FFI.Undefined;
+  _ajaxSettings.cache = Fay.FFI.Undefined;
+  _ajaxSettings.complete = Fay.FFI.Undefined;
+  _ajaxSettings.contentType = Fay.FFI.Undefined;
+  _ajaxSettings.crossDomain = Fay.FFI.Undefined;
+  _ajaxSettings.data$39$ = Fay.FFI.Undefined;
+  _ajaxSettings.dataType = Fay.FFI.Undefined;
+  _ajaxSettings.error$39$ = Fay.FFI.Undefined;
+  _ajaxSettings.$_global = Fay.FFI.Undefined;
+  _ajaxSettings.ifModified = Fay.FFI.Undefined;
+  _ajaxSettings.isLocal = Fay.FFI.Undefined;
+  _ajaxSettings.mimeType = Fay.FFI.Undefined;
+  _ajaxSettings.password = Fay.FFI.Undefined;
+  _ajaxSettings.processData = Fay.FFI.Undefined;
+  _ajaxSettings.success = Fay.FFI.Undefined;
+  _ajaxSettings.timeout = Fay.FFI.Undefined;
+  _ajaxSettings.type$39$ = Fay.FFI.Undefined;
+  _ajaxSettings.url = Fay.FFI.Undefined;
+  _ajaxSettings.username = Fay.FFI.Undefined;
+  return _ajaxSettings;
+});
+JQuery.ajax$39$ = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"], (function (o) {  delete o['instance'];  for (var p in o) {  if (/\$39\$/.test(p)) {  o[p.replace(/\$39\$/g, '')] = o[p];  delete o[p];  }  }  return jQuery.ajax(o);  })(Fay$$fayToJs(["user","AjaxSettings",[["automatic"],["automatic"]]],$p1))));
+  });
+};
+JQuery.addClass = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['addClass'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.addClassWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['addClass'](Fay$$fayToJs(["function",[["double"],["user","Text",[]],["action",[["user","Text",[]]]]]],$p1))));
+    });
+  };
+};
+JQuery.getAttr = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["defined",[["user","Text",[]]]],Fay$$fayToJs(["user","JQuery",[]],$p2)['attr'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.setAttr = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['attr'](Fay$$fayToJs(["user","Text",[]],$p1), Fay$$fayToJs(["user","Text",[]],$p2))));
+      });
+    };
+  };
+};
+JQuery.setAttrWith = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['attr'](Fay$$fayToJs(["user","Text",[]],$p1), Fay$$fayToJs(["function",[["double"],["user","Text",[]],["action",[["user","Text",[]]]]]],$p2))));
+      });
+    };
+  };
+};
+JQuery.hasClass = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay_bool(Fay$$fayToJs(["user","JQuery",[]],$p2)['hasClass'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.getHtml = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['html']()));
+  });
+};
+JQuery.setHtml = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['html'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.setHtmlWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['html'](Fay$$fayToJs(["function",[["double"],["user","Text",[]],["action",[["user","JQuery",[]]]]]],$p1))));
+    });
+  };
+};
+JQuery.getProp = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['prop'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.setProp = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['prop'](Fay$$fayToJs(["user","Text",[]],$p1), Fay$$fayToJs(["user","Text",[]],$p2))));
+      });
+    };
+  };
+};
+JQuery.setPropWith = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['prop'](Fay$$fayToJs(["user","Text",[]],$p1), Fay$$fayToJs(["function",[["double"],["user","Text",[]],["action",[["user","Text",[]]]]]],$p2))));
+      });
+    };
+  };
+};
+JQuery.removeAttr = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['removeAttr'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.removeClass = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['removeClass'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.removeClassWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['removeClass'](Fay$$fayToJs(["function",[["double"],["user","Text",[]],["action",[["user","JQuery",[]]]]]],$p1))));
+    });
+  };
+};
+JQuery.removeProp = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['removeProp'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.toggleClass = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['toggleClass'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.toggleClassBool = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['toggleClass'](Fay$$fayToJs(["user","Text",[]],$p1), Fay$$fayToJs_bool($p2))));
+      });
+    };
+  };
+};
+JQuery.toggleAllClasses = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['toggleClass'](Fay$$fayToJs_bool($p1))));
+    });
+  };
+};
+JQuery.toggleClassWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['toggleClass'](Fay$$fayToJs(["function",[["double"],["user","Text",[]],["bool"],["action",[["user","JQuery",[]]]]]],$p1))));
+    });
+  };
+};
+JQuery.toggleClassBoolWith = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['toggleClass'](Fay$$fayToJs(["function",[["double"],["user","Text",[]],["bool"],["action",[["user","JQuery",[]]]]]],$p1), Fay$$fayToJs_bool($p2))));
+      });
+    };
+  };
+};
+JQuery.getVal = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['val']()));
+  });
+};
+JQuery.setVal = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['val'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.setValWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['val'](Fay$$fayToJs(["function",[["double"],["user","Text",[]],["action",[["user","JQuery",[]]]]]],$p1))));
+    });
+  };
+};
+JQuery.setText = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['text'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.setTextWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['text'](Fay$$fayToJs(["function",[["double"],["user","Text",[]],["action",[["user","JQuery",[]]]]]],$p1))));
+    });
+  };
+};
+JQuery.getText = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['text']()));
+  });
+};
+JQuery.holdReady = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],jQuery['holdReady'](Fay$$fayToJs_bool($p1))));
+  });
+};
+JQuery.select = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],jQuery(Fay$$_(Fay$$fayToJs(["unknown"],$p1)))));
+  });
+};
+JQuery.selectEmpty = new Fay$$$(function(){
+  return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],jQuery()));
+});
+JQuery.selectInContext = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],jQuery(Fay$$_(Fay$$fayToJs(["unknown"],$p1)), Fay$$_(Fay$$fayToJs(["unknown"],$p2)))));
+    });
+  };
+};
+JQuery.ready = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"],jQuery(Fay$$fayToJs(["action",[["unknown"]]],$p1))));
+  });
+};
+JQuery.noConflict = new Fay$$$(function(){
+  return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],jQuery['noConflict']()));
+});
+JQuery.noConflictBool = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],jQuery['noConflict'](Fay$$fayToJs_bool($p1))));
+  });
+};
+JQuery.getCss = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['css'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.setCss = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['css'](Fay$$fayToJs(["user","Text",[]],$p1), Fay$$fayToJs(["user","Text",[]],$p2))));
+      });
+    };
+  };
+};
+JQuery.setCssWith = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['css'](Fay$$fayToJs(["user","Text",[]],$p1), Fay$$fayToJs(["function",[["double"],["user","Text",[]],["action",[["user","Text",[]]]]]],$p2))));
+      });
+    };
+  };
+};
+JQuery.getHeight = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay_double(Fay$$fayToJs(["user","JQuery",[]],$p1)['height']()));
+  });
+};
+JQuery.setHeight = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['height'](Fay$$fayToJs_double($p1))));
+    });
+  };
+};
+JQuery.setHeightWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['height'](Fay$$fayToJs(["function",[["double"],["double"],["action",[["double"]]]]],$p1))));
+    });
+  };
+};
+JQuery.getInnerHeight = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay_double(Fay$$fayToJs(["user","JQuery",[]],$p1)['innerHeight']()));
+  });
+};
+JQuery.getInnerWidth = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay_double(Fay$$fayToJs(["user","JQuery",[]],$p1)['innerWidth']()));
+  });
+};
+JQuery.getOuterHeight = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay_double(Fay$$fayToJs(["user","JQuery",[]],$p1)['outerHeight']()));
+  });
+};
+JQuery.getOuterHeightBool = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay_double(Fay$$fayToJs(["user","JQuery",[]],$p2)['outerHeight'](Fay$$fayToJs_bool($p1))));
+    });
+  };
+};
+JQuery.getOuterWidth = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay_double(Fay$$fayToJs(["user","JQuery",[]],$p1)['outerWidth']()));
+  });
+};
+JQuery.getOuterWidthBool = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay_double(Fay$$fayToJs(["user","JQuery",[]],$p2)['outerWidth'](Fay$$fayToJs_bool($p1))));
+    });
+  };
+};
+JQuery.getScrollLeft = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay_double(Fay$$fayToJs(["user","JQuery",[]],$p1)['scrollLeft']()));
+  });
+};
+JQuery.setScrollLeft = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['scrollLeft'](Fay$$fayToJs_double($p1))));
+    });
+  };
+};
+JQuery.getScrollTop = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay_double(Fay$$fayToJs(["user","JQuery",[]],$p1)['scrollTop']()));
+  });
+};
+JQuery.setScrollTop = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['scrollTop'](Fay$$fayToJs_double($p1))));
+    });
+  };
+};
+JQuery.getWidth = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay_double(Fay$$fayToJs(["user","JQuery",[]],$p1)['width']()));
+  });
+};
+JQuery.setWidth = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['width'](Fay$$fayToJs_double($p1))));
+    });
+  };
+};
+JQuery.setWidthWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['width'](Fay$$fayToJs(["function",[["double"],["double"],["action",[["double"]]]]],$p1))));
+    });
+  };
+};
+JQuery._Show = function Show(){
+};
+JQuery._Show.prototype.instance = "Show";
+JQuery.Show = new Fay$$$(function(){
+  return new JQuery._Show();
+});
+JQuery._Hide = function Hide(){
+};
+JQuery._Hide.prototype.instance = "Hide";
+JQuery.Hide = new Fay$$$(function(){
+  return new JQuery._Hide();
+});
+JQuery._Toggle = function Toggle(){
+};
+JQuery._Toggle.prototype.instance = "Toggle";
+JQuery.Toggle = new Fay$$$(function(){
+  return new JQuery._Toggle();
+});
+JQuery._FadeIn = function FadeIn(){
+};
+JQuery._FadeIn.prototype.instance = "FadeIn";
+JQuery.FadeIn = new Fay$$$(function(){
+  return new JQuery._FadeIn();
+});
+JQuery._FadeOut = function FadeOut(){
+};
+JQuery._FadeOut.prototype.instance = "FadeOut";
+JQuery.FadeOut = new Fay$$$(function(){
+  return new JQuery._FadeOut();
+});
+JQuery._FadeToggle = function FadeToggle(){
+};
+JQuery._FadeToggle.prototype.instance = "FadeToggle";
+JQuery.FadeToggle = new Fay$$$(function(){
+  return new JQuery._FadeToggle();
+});
+JQuery._Instantly = function Instantly(){
+};
+JQuery._Instantly.prototype.instance = "Instantly";
+JQuery.Instantly = new Fay$$$(function(){
+  return new JQuery._Instantly();
+});
+JQuery._Slow = function Slow(){
+};
+JQuery._Slow.prototype.instance = "Slow";
+JQuery.Slow = new Fay$$$(function(){
+  return new JQuery._Slow();
+});
+JQuery._Fast = function Fast(){
+};
+JQuery._Fast.prototype.instance = "Fast";
+JQuery.Fast = new Fay$$$(function(){
+  return new JQuery._Fast();
+});
+JQuery._Speed = function Speed(slot1){
+  this.slot1 = slot1;
+};
+JQuery._Speed.prototype.instance = "Speed";
+JQuery.Speed = function(slot1){
+  return new Fay$$$(function(){
+    return new JQuery._Speed(slot1);
+  });
+};
+JQuery._Animation = function Animation(_type,_speed,_nextAnimation,_element){
+  this._type = _type;
+  this._speed = _speed;
+  this._nextAnimation = _nextAnimation;
+  this._element = _element;
+};
+JQuery._Animation.prototype.instance = "Animation";
+JQuery.Animation = function(_type){
+  return function(_speed){
+    return function(_nextAnimation){
+      return function(_element){
+        return new Fay$$$(function(){
+          return new JQuery._Animation(_type,_speed,_nextAnimation,_element);
+        });
+      };
+    };
+  };
+};
+JQuery._type = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x)._type;
+  });
+};
+JQuery._speed = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x)._speed;
+  });
+};
+JQuery._nextAnimation = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x)._nextAnimation;
+  });
+};
+JQuery._element = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x)._element;
+  });
+};
+JQuery.anim = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var el = $p2;
+      var ty = $p1;
+      return Fay$$_(Fay$$_(Fay$$_(Fay$$_(JQuery.Animation)(ty))(JQuery.Fast))(Prelude.Nothing))(el);
+    });
+  };
+};
+JQuery.speed = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var ani = $p2;
+      var spd = $p1;
+      return (function(){
+        var $36$_record_to_update = Object.create(Fay$$_(ani));
+        $36$_record_to_update._speed = spd;
+        return $36$_record_to_update;
+      })();
+    });
+  };
+};
+JQuery.chainAnim = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var a2 = $p2;
+      var a1 = $p1;
+      return (function(){
+        var $36$_record_to_update = Object.create(Fay$$_(a1));
+        $36$_record_to_update._nextAnimation = Fay$$_(Prelude.Just)(a2);
+        return $36$_record_to_update;
+      })();
+    });
+  };
+};
+JQuery.chainAnims = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$listLen(Fay$$_($p1),1)) {
+      var a = Fay$$index(0,Fay$$_($p1));
+      return a;
+    }
+    var $tmp1 = Fay$$_($p1);
+    if ($tmp1 instanceof Fay$$Cons) {
+      var a = $tmp1.car;
+      var as = $tmp1.cdr;
+      return Fay$$_(Fay$$_(JQuery.chainAnim)(a))(Fay$$_(JQuery.chainAnims)(as));
+    }
+    if (Fay$$_($p1) === null) {
+      return Fay$$_(Prelude.error)(Fay$$_(Data.Text.unpack)("chainAnims: empty list"));
+    }
+    throw ["unhandled case in chainAnims",[$p1]];
+  });
+};
+JQuery.runAnimation = function($p1){
+  return new Fay$$$(function(){
+    var a = $p1;
+    return (function(){
+      var cb = new Fay$$$(function(){
+        return (function($tmp1){
+          if (Fay$$_($tmp1) instanceof Prelude._Just) {
+            var a2 = Fay$$_($tmp1).slot1;
+            return Fay$$_(Prelude.$_const)(Fay$$_(JQuery.runAnimation)(a2));
+          }
+          if (Fay$$_($tmp1) instanceof Prelude._Nothing) {
+            return Fay$$_(Prelude.$_const)(Fay$$_(Fay$$$_return)(Fay$$unit));
+          }
+          return (function(){ throw (["unhandled case",$tmp1]); })();
+        })(Fay$$_(JQuery._nextAnimation)(a));
+      });
+      return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(Fay$$_(JQuery.animate)(Fay$$_(JQuery._type)(a)))(Fay$$_(JQuery._speed)(a)))(cb))(Fay$$_(JQuery._element)(a))))(Fay$$_(Fay$$$_return)(Fay$$unit));
+    })();
+  });
+};
+JQuery.animate = function($p1){
+  return function($p2){
+    return function($p3){
+      return function($p4){
+        return new Fay$$$(function(){
+          return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p4)[(function () {  switch (Fay$$fayToJs(["user","AnimationType",[]],$p1)['instance']) {  case 'FadeIn': return 'fadeIn';  case 'FadeOut': return 'fadeOut';  case 'FadeToggle': return 'fadeToggle';  default: return Fay$$fayToJs(["user","AnimationType",[]],$p1)['instance']['toLowerCase']();  }  })()]((function () {  if (Fay$$fayToJs(["user","Speed",[]],$p2)['instance'] == 'Slow') {  return 'slow';  } else if (Fay$$fayToJs(["user","Speed",[]],$p2)['instance'] == 'Instantly') {  return null;  } else if (Fay$$fayToJs(["user","Speed",[]],$p2)['instance'] == 'Fast') {  return 'fast';  } else {  return Fay$$fayToJs(["user","Speed",[]],$p2)['slot1'];  }  })(), function() {  Fay$$fayToJs(["function",[["user","JQuery",[]],["action",[["unknown"]]]]],$p3)(jQuery(this));  })));
+        });
+      };
+    };
+  };
+};
+JQuery.hide = function($p1){
+  return new Fay$$$(function(){
+    var spd = $p1;
+    return Fay$$_(Fay$$_(Fay$$_(JQuery.animate)(JQuery.Hide))(spd))(JQuery.emptyCallback);
+  });
+};
+JQuery.unhide = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['show']()));
+  });
+};
+JQuery.jshow = function($p1){
+  return new Fay$$$(function(){
+    var spd = $p1;
+    return Fay$$_(Fay$$_(Fay$$_(JQuery.animate)(JQuery.Show))(spd))(JQuery.emptyCallback);
+  });
+};
+JQuery.toggle = function($p1){
+  return new Fay$$$(function(){
+    var spd = $p1;
+    return Fay$$_(Fay$$_(Fay$$_(JQuery.animate)(JQuery.Toggle))(spd))(JQuery.emptyCallback);
+  });
+};
+JQuery.fadeIn = function($p1){
+  return new Fay$$$(function(){
+    var spd = $p1;
+    return Fay$$_(Fay$$_(Fay$$_(JQuery.animate)(JQuery.FadeIn))(spd))(JQuery.emptyCallback);
+  });
+};
+JQuery.fadeOut = function($p1){
+  return new Fay$$$(function(){
+    var spd = $p1;
+    return Fay$$_(Fay$$_(Fay$$_(JQuery.animate)(JQuery.FadeOut))(spd))(JQuery.emptyCallback);
+  });
+};
+JQuery.fadeToggle = function($p1){
+  return new Fay$$$(function(){
+    var spd = $p1;
+    return Fay$$_(Fay$$_(Fay$$_(JQuery.animate)(JQuery.FadeToggle))(spd))(JQuery.emptyCallback);
+  });
+};
+JQuery.resize = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p2)['resize'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.scroll = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p2)['scroll'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.load = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p2)['load'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.documentReady = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],jQuery(Fay$$fayToJs(["user","Document",[]],$p2))['ready'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.unload = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],jQuery(Fay$$fayToJs(["user","Window",[]],$p2))['unload'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.click = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['click'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.dblclick = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['dblclick'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.focusin = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['focusin'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.focusout = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['focusout'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.hover = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['hover'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.mousedown = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['mousedown'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.mouseenter = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['mouseenter'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.mouseleave = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['mouseleave'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.mousemove = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['mousemove'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.mouseout = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['mouseout'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.mouseover = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['mouseover'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.mouseup = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['mouseup'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.toggleEvents = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p2)['toggle']['apply'](Fay$$fayToJs(["user","JQuery",[]],$p2), Fay$$fayToJs(["list",[["function",[["user","Event",[]],["action",[["unknown"]]]]]]],$p1))));
+    });
+  };
+};
+JQuery.bind = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p3)['bind'](Fay$$fayToJs(["user","EventType",[]],$p1), Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p2))));
+      });
+    };
+  };
+};
+JQuery.bindPreventBubble = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p3)['bind'](Fay$$fayToJs(["user","EventType",[]],$p1),Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p2),false)));
+      });
+    };
+  };
+};
+JQuery.on = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p3)['on'](Fay$$fayToJs(["user","EventType",[]],$p1), Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p2))));
+      });
+    };
+  };
+};
+JQuery.onDelegate = function($p1){
+  return function($p2){
+    return function($p3){
+      return function($p4){
+        return new Fay$$$(function(){
+          return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p4)['on'](Fay$$fayToJs(["user","EventType",[]],$p1),Fay$$fayToJs(["user","Selector",[]],$p2),Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p3))));
+        });
+      };
+    };
+  };
+};
+JQuery.one = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p3)['one'](Fay$$fayToJs(["user","EventType",[]],$p1), Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p2))));
+      });
+    };
+  };
+};
+JQuery.trigger = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p2)['trigger'](Fay$$fayToJs(["user","EventType",[]],$p1))));
+    });
+  };
+};
+JQuery.triggerHandler = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p2)['triggerHandler'](Fay$$fayToJs(["user","EventType",[]],$p1))));
+    });
+  };
+};
+JQuery.delegateTarget = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","Element",[]],jQuery(Fay$$fayToJs(["user","Event",[]],$p1)['delegateTarget'])));
+  });
+};
+JQuery.isDefaultPrevented = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay_bool(Fay$$fayToJs(["user","Event",[]],$p1)['isDefaultPrevented']()));
+  });
+};
+JQuery.isImmediatePropagationStopped = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay_bool(Fay$$fayToJs(["user","Event",[]],$p1)['isImmediatePropagationStopped']()));
+  });
+};
+JQuery.isPropagationStopped = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","Element",[]],Fay$$fayToJs(["user","Event",[]],$p1)['isPropagationStopped']()));
+  });
+};
+JQuery.namespace = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","Event",[]],$p1)['namespace']));
+  });
+};
+JQuery.pageX = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay_double(Fay$$fayToJs(["user","Event",[]],$p1)['pageX']));
+  });
+};
+JQuery.pageY = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay_double(Fay$$fayToJs(["user","Event",[]],$p1)['pageY']));
+  });
+};
+JQuery.preventDefault = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","Event",[]],$p1)['preventDefault']()));
+  });
+};
+JQuery.target = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","Element",[]],Fay$$fayToJs(["user","Event",[]],$p1)['target']));
+  });
+};
+JQuery.timeStamp = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay_double(Fay$$fayToJs(["user","Event",[]],$p1)['timeStamp']));
+  });
+};
+JQuery.eventType = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["user","Event",[]],$p1)['type']));
+  });
+};
+JQuery.which = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay_int(Fay$$fayToJs(["user","Event",[]],$p1)['which']));
+  });
+};
+JQuery.blur = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p2)['blur'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.change = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p2)['change'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.onFocus = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p2)['focus'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.focus = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['focus']()));
+  });
+};
+JQuery.onselect = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p2)['select'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.submit = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p2)['submit'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.keydown = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p2)['keydown'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.keypress = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p2)['keypress'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.keyup = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p2)['keyup'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["unknown"]]]]],$p1))));
+    });
+  };
+};
+JQuery.after = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['after'](Fay$$_(Fay$$fayToJs(["unknown"],$p1)))));
+    });
+  };
+};
+JQuery.afterWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['after'](Fay$$fayToJs(["function",[["double"],["action",[["user","JQuery",[]]]]]],$p1))));
+    });
+  };
+};
+JQuery.append = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['append'](Fay$$_(Fay$$fayToJs(["unknown"],$p1)))));
+    });
+  };
+};
+JQuery.appendJQuery = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['append'](Fay$$fayToJs(["user","JQuery",[]],$p1))));
+    });
+  };
+};
+JQuery.appendWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['append'](Fay$$fayToJs(["function",[["double"],["action",[["user","JQuery",[]]]]]],$p1))));
+    });
+  };
+};
+JQuery.appendTo = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['appendTo'](Fay$$_(Fay$$fayToJs(["unknown"],$p1)))));
+    });
+  };
+};
+JQuery.appendToJQuery = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['appendTo'](Fay$$fayToJs(["user","JQuery",[]],$p1))));
+    });
+  };
+};
+JQuery.before = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['before'](Fay$$_(Fay$$fayToJs(["unknown"],$p1)))));
+    });
+  };
+};
+JQuery.beforeWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['before'](Fay$$fayToJs(["function",[["double"],["action",[["user","JQuery",[]]]]]],$p1))));
+    });
+  };
+};
+JQuery._WithoutDataAndEvents = function WithoutDataAndEvents(){
+};
+JQuery._WithoutDataAndEvents.prototype.instance = "WithoutDataAndEvents";
+JQuery.WithoutDataAndEvents = new Fay$$$(function(){
+  return new JQuery._WithoutDataAndEvents();
+});
+JQuery._WithDataAndEvents = function WithDataAndEvents(){
+};
+JQuery._WithDataAndEvents.prototype.instance = "WithDataAndEvents";
+JQuery.WithDataAndEvents = new Fay$$$(function(){
+  return new JQuery._WithDataAndEvents();
+});
+JQuery._DeepWithDataAndEvents = function DeepWithDataAndEvents(){
+};
+JQuery._DeepWithDataAndEvents.prototype.instance = "DeepWithDataAndEvents";
+JQuery.DeepWithDataAndEvents = new Fay$$$(function(){
+  return new JQuery._DeepWithDataAndEvents();
+});
+JQuery.clone = function($p1){
+  return new Fay$$$(function(){
+    if (Fay$$_($p1) instanceof JQuery._WithoutDataAndEvents) {
+      return function($p1){
+        return new Fay$$$(function(){
+          return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['clone'](false)));
+        });
+      };
+    }
+    if (Fay$$_($p1) instanceof JQuery._WithDataAndEvents) {
+      return function($p1){
+        return new Fay$$$(function(){
+          return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['clone'](true, false)));
+        });
+      };
+    }
+    if (Fay$$_($p1) instanceof JQuery._DeepWithDataAndEvents) {
+      return function($p1){
+        return new Fay$$$(function(){
+          return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['clone'](true, true)));
+        });
+      };
+    }
+    throw ["unhandled case in clone",[$p1]];
+  });
+};
+JQuery.detach = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['detach']()));
+  });
+};
+JQuery.detachSelector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['detach'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.empty = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['empty']()));
+  });
+};
+JQuery.insertAfter = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['insertAfter'](Fay$$_(Fay$$fayToJs(["unknown"],$p1)))));
+    });
+  };
+};
+JQuery.insertBefore = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['insertBefore'](Fay$$_(Fay$$fayToJs(["unknown"],$p1)))));
+    });
+  };
+};
+JQuery.prepend = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['prepend'](Fay$$_(Fay$$fayToJs(["unknown"],$p1)))));
+    });
+  };
+};
+JQuery.prependWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['prepend'](Fay$$fayToJs(["function",[["double"],["action",[["user","JQuery",[]]]]]],$p1))));
+    });
+  };
+};
+JQuery.prependTo = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['prependTo'](Fay$$_(Fay$$fayToJs(["unknown"],$p1)))));
+    });
+  };
+};
+JQuery.remove = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['remove']()));
+  });
+};
+JQuery.removeSelector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['remove'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.replaceAll = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['replaceAll'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.replaceWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['replaceWith'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.replaceWithJQuery = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['replaceWith'](Fay$$fayToJs(["user","JQuery",[]],$p1))));
+    });
+  };
+};
+JQuery.replaceWithWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['replaceWith'](Fay$$fayToJs(["action",[["user","JQuery",[]]]],$p1))));
+    });
+  };
+};
+JQuery.unwrap = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['unwrap']()));
+  });
+};
+JQuery.wrap = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['wrap'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.wrapWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['wrap'](Fay$$fayToJs(["function",[["double"],["action",[["user","JQuery",[]]]]]],$p1))));
+    });
+  };
+};
+JQuery.wrapAllHtml = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['wrapAll'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.wrapAllSelector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['wrapAll'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.wrapAllElement = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['wrapAll'](Fay$$fayToJs(["user","Element",[]],$p1))));
+    });
+  };
+};
+JQuery.wrapInnerHtml = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['wrapInner'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.wrapInnerSelector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['wrapInner'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.wrapInnerElement = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['wrapInner'](Fay$$fayToJs(["user","Element",[]],$p1))));
+    });
+  };
+};
+JQuery.addSelector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['add'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.addElement = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['add'](Fay$$fayToJs(["user","Element",[]],$p1))));
+    });
+  };
+};
+JQuery.addHtml = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['add'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.add = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['add'](Fay$$fayToJs(["user","JQuery",[]],$p1))));
+    });
+  };
+};
+JQuery.addSelectorWithContext = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['add'](Fay$$fayToJs(["user","Text",[]],$p1), Fay$$fayToJs(["user","JQuery",[]],$p2))));
+      });
+    };
+  };
+};
+JQuery.andSelf = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['andSelf']()));
+  });
+};
+JQuery.children = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['children']()));
+  });
+};
+JQuery.childrenMatching = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['children'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.closestSelector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['closest'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.closestWithContext = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['closest'](Fay$$fayToJs(["user","Text",[]],$p1), Fay$$fayToJs(["user","Text",[]],$p2))));
+      });
+    };
+  };
+};
+JQuery.closest = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['closest'](Fay$$fayToJs(["user","JQuery",[]],$p1))));
+    });
+  };
+};
+JQuery.closestElement = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['closest'](Fay$$fayToJs(["user","Element",[]],$p1))));
+    });
+  };
+};
+JQuery.contents = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['contents']()));
+  });
+};
+JQuery.each = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['each'](Fay$$fayToJs(["function",[["double"],["user","Element",[]],["action",[["bool"]]]]],$p1))));
+    });
+  };
+};
+JQuery.end = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['end']()));
+  });
+};
+JQuery.eq = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['eq'](Fay$$fayToJs_double($p1))));
+    });
+  };
+};
+JQuery.filter = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['filter'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.filterWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['filter'](Fay$$fayToJs(["function",[["double"],["action",[["bool"]]]]],$p1))));
+    });
+  };
+};
+JQuery.filterElement = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['filter'](Fay$$fayToJs(["user","Element",[]],$p1))));
+    });
+  };
+};
+JQuery.filterJQuery = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['filter'](Fay$$fayToJs(["user","JQuery",[]],$p1))));
+    });
+  };
+};
+JQuery.findSelector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['find'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.findJQuery = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['find'](Fay$$fayToJs(["user","JQuery",[]],$p1))));
+    });
+  };
+};
+JQuery.findElement = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['find'](Fay$$fayToJs(["user","Element",[]],$p1))));
+    });
+  };
+};
+JQuery.first = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['first']()));
+  });
+};
+JQuery.has = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['has'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.hasElement = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['has'](Fay$$fayToJs(["user","Element",[]],$p1))));
+    });
+  };
+};
+JQuery.is = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay_bool(Fay$$fayToJs(["user","JQuery",[]],$p2)['is'](Fay$$_(Fay$$fayToJs(["unknown"],$p1)))));
+    });
+  };
+};
+JQuery.isWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['is'](Fay$$fayToJs(["function",[["int"],["bool"]]],$p1))));
+    });
+  };
+};
+JQuery.last = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['last']()));
+  });
+};
+JQuery.jQueryMap = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['map'](Fay$$fayToJs(["function",[["double"],["user","Element",[]],["action",[["user","JQuery",[]]]]]],$p1))));
+    });
+  };
+};
+JQuery.next = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['next']()));
+  });
+};
+JQuery.nextSelector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['next'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.nextAll = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['nextAll']()));
+  });
+};
+JQuery.nextAllSelector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['nextAll'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.nextUntil = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['nextUntil'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.nextUntilFiltered = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['nextUntil'](Fay$$fayToJs(["user","Text",[]],$p1), Fay$$fayToJs(["user","Text",[]],$p2))));
+      });
+    };
+  };
+};
+JQuery.nextUntilElement = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['nextUntil'](Fay$$fayToJs(["user","Element",[]],$p1))));
+    });
+  };
+};
+JQuery.nextUntilElementFiltered = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['nextUntil'](Fay$$fayToJs(["user","Element",[]],$p1), Fay$$fayToJs(["user","Text",[]],$p2))));
+      });
+    };
+  };
+};
+JQuery.not = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['not'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.notElement = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['not'](Fay$$fayToJs(["user","Element",[]],$p1))));
+    });
+  };
+};
+JQuery.notElements = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['not'](Fay$$fayToJs(["list",[["user","Element",[]]]],$p1))));
+    });
+  };
+};
+JQuery.notWith = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['not'](Fay$$fayToJs(["function",[["double"],["bool"]]],$p1))));
+    });
+  };
+};
+JQuery.notJQuery = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['not'](Fay$$fayToJs(["user","JQuery",[]],$p1))));
+    });
+  };
+};
+JQuery.offsetParent = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['offsetParent']()));
+  });
+};
+JQuery.parent = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['parent']()));
+  });
+};
+JQuery.parentSelector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['parent'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.parents = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['parents']()));
+  });
+};
+JQuery.parentsSelector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['parents'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.parentsUntil = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['parentsUntil'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.parentsUntilFiltered = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['parentsUntil'](Fay$$fayToJs(["user","Text",[]],$p1), Fay$$fayToJs(["user","Text",[]],$p2))));
+      });
+    };
+  };
+};
+JQuery.parentsUntilElement = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['parentsUntil'](Fay$$fayToJs(["user","Element",[]],$p1))));
+    });
+  };
+};
+JQuery.parentsUntilElementFiltered = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['parentsUntil'](Fay$$fayToJs(["user","Element",[]],$p1), Fay$$fayToJs(["user","Text",[]],$p2))));
+      });
+    };
+  };
+};
+JQuery.prev = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['prev']()));
+  });
+};
+JQuery.prevSelector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['prev'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.prevAll = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['prevAll']()));
+  });
+};
+JQuery.prevAllSelector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['prevAll'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.prevUntil = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['prevUntil'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.prevUntilFiltered = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['prevUntil'](Fay$$fayToJs(["user","Text",[]],$p1), Fay$$fayToJs(["user","Text",[]],$p2))));
+      });
+    };
+  };
+};
+JQuery.prevUntilElement = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['prevUntil'](Fay$$fayToJs(["user","Element",[]],$p1))));
+    });
+  };
+};
+JQuery.prevUntilElementFiltered = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['prevUntil'](Fay$$fayToJs(["user","Element",[]],$p1), Fay$$fayToJs(["user","Text",[]],$p2))));
+      });
+    };
+  };
+};
+JQuery.siblings = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['siblings']()));
+  });
+};
+JQuery.siblingsSelector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['siblings'](Fay$$fayToJs(["user","Text",[]],$p1))));
+    });
+  };
+};
+JQuery.slice = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['slice'](Fay$$fayToJs_double($p1))));
+    });
+  };
+};
+JQuery.sliceFromTo = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p3)['slice'](Fay$$fayToJs_double($p1), Fay$$fayToJs_double($p2))));
+      });
+    };
+  };
+};
+JQuery._KeyUp = function KeyUp(){
+};
+JQuery._KeyUp.prototype.instance = "KeyUp";
+JQuery.KeyUp = new Fay$$$(function(){
+  return new JQuery._KeyUp();
+});
+JQuery._KeyDown = function KeyDown(){
+};
+JQuery._KeyDown.prototype.instance = "KeyDown";
+JQuery.KeyDown = new Fay$$$(function(){
+  return new JQuery._KeyDown();
+});
+JQuery._KeyLeft = function KeyLeft(){
+};
+JQuery._KeyLeft.prototype.instance = "KeyLeft";
+JQuery.KeyLeft = new Fay$$$(function(){
+  return new JQuery._KeyLeft();
+});
+JQuery._KeyRight = function KeyRight(){
+};
+JQuery._KeyRight.prototype.instance = "KeyRight";
+JQuery.KeyRight = new Fay$$$(function(){
+  return new JQuery._KeyRight();
+});
+JQuery._KeyRet = function KeyRet(){
+};
+JQuery._KeyRet.prototype.instance = "KeyRet";
+JQuery.KeyRet = new Fay$$$(function(){
+  return new JQuery._KeyRet();
+});
+JQuery._SomeKey = function SomeKey(slot1){
+  this.slot1 = slot1;
+};
+JQuery._SomeKey.prototype.instance = "SomeKey";
+JQuery.SomeKey = function(slot1){
+  return new Fay$$$(function(){
+    return new JQuery._SomeKey(slot1);
+  });
+};
+JQuery.onKeycode = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var el = $p2;
+      var callback = $p1;
+      return Fay$$_(Fay$$_(JQuery._onKeycode)(function($p1){
+        var code = $p1;
+        return Fay$$_(callback)((function($tmp1){
+          if (Fay$$_($tmp1) === 38) {
+            return JQuery.KeyUp;
+          }
+          if (Fay$$_($tmp1) === 40) {
+            return JQuery.KeyDown;
+          }
+          if (Fay$$_($tmp1) === 37) {
+            return JQuery.KeyLeft;
+          }
+          if (Fay$$_($tmp1) === 39) {
+            return JQuery.KeyRight;
+          }
+          if (Fay$$_($tmp1) === 13) {
+            return JQuery.KeyRet;
+          }
+          return Fay$$_(JQuery.SomeKey)(code);
+        })(code));
+      }))(el);
+    });
+  };
+};
+JQuery._onKeycode = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['keycode'](Fay$$fayToJs(["function",[["double"],["action",[["bool"]]]]],$p1))));
+    });
+  };
+};
+JQuery.unKeycode = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['unkeycode']()));
+  });
+};
+JQuery.onClick = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['click'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["bool"]]]]],$p1))));
+    });
+  };
+};
+JQuery.onChange = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['change'](Fay$$fayToJs(["action",[["unknown"]]],$p1))));
+    });
+  };
+};
+JQuery.onSubmit = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['submit'](Fay$$fayToJs(["action",[["bool"]]],$p1))));
+    });
+  };
+};
+JQuery.eventX = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay_double(Fay$$fayToJs(["user","Event",[]],$p1)['pageX'] - Fay$$fayToJs(["user","JQuery",[]],$p2)['get'](0)['offsetLeft']);
+    });
+  };
+};
+JQuery.eventY = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay_double(Fay$$fayToJs(["user","Event",[]],$p1)['pageY'] - Fay$$fayToJs(["user","JQuery",[]],$p2)['get'](0)['offsetTop']);
+    });
+  };
+};
+JQuery.onDblClick = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['dblclick'](Fay$$fayToJs(["function",[["user","Event",[]],["action",[["bool"]]]]],$p1))));
+    });
+  };
+};
+JQuery.setDraggable = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p1)['draggable']()));
+  });
+};
+JQuery.validate = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","JQuery",[]],$p1)['validate']({ "submitHandler": Fay$$fayToJs(["action",[["unknown"]]],$p2) })));
+    });
+  };
+};
+JQuery.onLivechange = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['livechange'](50,Fay$$fayToJs(["action",[["unknown"]]],$p1))));
+    });
+  };
+};
+Fay$$objConcat(Fay$$fayToJsHash,{"AjaxSettings": function(type,argTypes,_obj){
+  var obj_ = {"instance": "AjaxSettings"};
+  var obj_accepts = Fay$$fayToJs(["defined",[["user","Text",[]]]],_obj.accepts);
+  if (undefined !== obj_accepts) {
+    obj_['accepts'] = obj_accepts;
+  }
+  var obj_async = Fay$$fayToJs(["defined",[["bool"]]],_obj.async);
+  if (undefined !== obj_async) {
+    obj_['async'] = obj_async;
+  }
+  var obj_beforeSend = Fay$$fayToJs(["defined",[["function",[["user","JQXHR",[]],["user","AjaxSettings",[argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"],argTypes && (argTypes)[1] ? (argTypes)[1] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"]]],["action",[argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"]]]]]]],_obj.beforeSend);
+  if (undefined !== obj_beforeSend) {
+    obj_['beforeSend'] = obj_beforeSend;
+  }
+  var obj_cache = Fay$$fayToJs(["defined",[["bool"]]],_obj.cache);
+  if (undefined !== obj_cache) {
+    obj_['cache'] = obj_cache;
+  }
+  var obj_complete = Fay$$fayToJs(["defined",[["function",[["user","JQXHR",[]],["user","Text",[]],["action",[argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"]]]]]]],_obj.complete);
+  if (undefined !== obj_complete) {
+    obj_['complete'] = obj_complete;
+  }
+  var obj_contentType = Fay$$fayToJs(["defined",[["user","Text",[]]]],_obj.contentType);
+  if (undefined !== obj_contentType) {
+    obj_['contentType'] = obj_contentType;
+  }
+  var obj_crossDomain = Fay$$fayToJs(["defined",[["bool"]]],_obj.crossDomain);
+  if (undefined !== obj_crossDomain) {
+    obj_['crossDomain'] = obj_crossDomain;
+  }
+  var obj_data$39$ = Fay$$fayToJs(["defined",[argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"]]],_obj.data$39$);
+  if (undefined !== obj_data$39$) {
+    obj_['data$39$'] = obj_data$39$;
+  }
+  var obj_dataType = Fay$$fayToJs(["defined",[["user","Text",[]]]],_obj.dataType);
+  if (undefined !== obj_dataType) {
+    obj_['dataType'] = obj_dataType;
+  }
+  var obj_error$39$ = Fay$$fayToJs(["defined",[["function",[["user","JQXHR",[]],["user","Maybe",[["user","Text",[]]]],["user","Maybe",[["user","Text",[]]]],["action",[argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"]]]]]]],_obj.error$39$);
+  if (undefined !== obj_error$39$) {
+    obj_['error$39$'] = obj_error$39$;
+  }
+  var obj_global = Fay$$fayToJs(["defined",[["bool"]]],_obj.$_global);
+  if (undefined !== obj_global) {
+    obj_['$_global'] = obj_global;
+  }
+  var obj_ifModified = Fay$$fayToJs(["defined",[["bool"]]],_obj.ifModified);
+  if (undefined !== obj_ifModified) {
+    obj_['ifModified'] = obj_ifModified;
+  }
+  var obj_isLocal = Fay$$fayToJs(["defined",[["bool"]]],_obj.isLocal);
+  if (undefined !== obj_isLocal) {
+    obj_['isLocal'] = obj_isLocal;
+  }
+  var obj_mimeType = Fay$$fayToJs(["defined",[["user","Text",[]]]],_obj.mimeType);
+  if (undefined !== obj_mimeType) {
+    obj_['mimeType'] = obj_mimeType;
+  }
+  var obj_password = Fay$$fayToJs(["defined",[["user","Text",[]]]],_obj.password);
+  if (undefined !== obj_password) {
+    obj_['password'] = obj_password;
+  }
+  var obj_processData = Fay$$fayToJs(["defined",[["bool"]]],_obj.processData);
+  if (undefined !== obj_processData) {
+    obj_['processData'] = obj_processData;
+  }
+  var obj_success = Fay$$fayToJs(["defined",[["function",[argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"],["action",[argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"]]]]]]],_obj.success);
+  if (undefined !== obj_success) {
+    obj_['success'] = obj_success;
+  }
+  var obj_timeout = Fay$$fayToJs(["defined",[["double"]]],_obj.timeout);
+  if (undefined !== obj_timeout) {
+    obj_['timeout'] = obj_timeout;
+  }
+  var obj_type$39$ = Fay$$fayToJs(["defined",[["user","Text",[]]]],_obj.type$39$);
+  if (undefined !== obj_type$39$) {
+    obj_['type$39$'] = obj_type$39$;
+  }
+  var obj_url = Fay$$fayToJs(["defined",[["user","Text",[]]]],_obj.url);
+  if (undefined !== obj_url) {
+    obj_['url'] = obj_url;
+  }
+  var obj_username = Fay$$fayToJs(["defined",[["user","Text",[]]]],_obj.username);
+  if (undefined !== obj_username) {
+    obj_['username'] = obj_username;
+  }
+  return obj_;
+},"Show": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Show"};
+  return obj_;
+},"Hide": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Hide"};
+  return obj_;
+},"Toggle": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Toggle"};
+  return obj_;
+},"FadeIn": function(type,argTypes,_obj){
+  var obj_ = {"instance": "FadeIn"};
+  return obj_;
+},"FadeOut": function(type,argTypes,_obj){
+  var obj_ = {"instance": "FadeOut"};
+  return obj_;
+},"FadeToggle": function(type,argTypes,_obj){
+  var obj_ = {"instance": "FadeToggle"};
+  return obj_;
+},"Instantly": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Instantly"};
+  return obj_;
+},"Slow": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Slow"};
+  return obj_;
+},"Fast": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Fast"};
+  return obj_;
+},"Speed": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Speed"};
+  var obj_slot1 = Fay$$fayToJs_double(_obj.slot1);
+  if (undefined !== obj_slot1) {
+    obj_['slot1'] = obj_slot1;
+  }
+  return obj_;
+},"Animation": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Animation"};
+  var obj__type = Fay$$fayToJs(["user","AnimationType",[]],_obj._type);
+  if (undefined !== obj__type) {
+    obj_['_type'] = obj__type;
+  }
+  var obj__speed = Fay$$fayToJs(["user","Speed",[]],_obj._speed);
+  if (undefined !== obj__speed) {
+    obj_['_speed'] = obj__speed;
+  }
+  var obj__nextAnimation = Fay$$fayToJs(["user","Maybe",[["user","Animation",[]]]],_obj._nextAnimation);
+  if (undefined !== obj__nextAnimation) {
+    obj_['_nextAnimation'] = obj__nextAnimation;
+  }
+  var obj__element = Fay$$fayToJs(["user","JQuery",[]],_obj._element);
+  if (undefined !== obj__element) {
+    obj_['_element'] = obj__element;
+  }
+  return obj_;
+},"WithoutDataAndEvents": function(type,argTypes,_obj){
+  var obj_ = {"instance": "WithoutDataAndEvents"};
+  return obj_;
+},"WithDataAndEvents": function(type,argTypes,_obj){
+  var obj_ = {"instance": "WithDataAndEvents"};
+  return obj_;
+},"DeepWithDataAndEvents": function(type,argTypes,_obj){
+  var obj_ = {"instance": "DeepWithDataAndEvents"};
+  return obj_;
+},"KeyUp": function(type,argTypes,_obj){
+  var obj_ = {"instance": "KeyUp"};
+  return obj_;
+},"KeyDown": function(type,argTypes,_obj){
+  var obj_ = {"instance": "KeyDown"};
+  return obj_;
+},"KeyLeft": function(type,argTypes,_obj){
+  var obj_ = {"instance": "KeyLeft"};
+  return obj_;
+},"KeyRight": function(type,argTypes,_obj){
+  var obj_ = {"instance": "KeyRight"};
+  return obj_;
+},"KeyRet": function(type,argTypes,_obj){
+  var obj_ = {"instance": "KeyRet"};
+  return obj_;
+},"SomeKey": function(type,argTypes,_obj){
+  var obj_ = {"instance": "SomeKey"};
+  var obj_slot1 = Fay$$fayToJs_double(_obj.slot1);
+  if (undefined !== obj_slot1) {
+    obj_['slot1'] = obj_slot1;
+  }
+  return obj_;
+}});
+Fay$$objConcat(Fay$$jsToFayHash,{"AjaxSettings": function(type,argTypes,obj){
+  return new JQuery._AjaxSettings(Fay$$jsToFay(["defined",[["user","Text",[]]]],obj["accepts"]),Fay$$jsToFay(["defined",[["bool"]]],obj["async"]),Fay$$jsToFay(["defined",[["function",[["user","JQXHR",[]],["user","AjaxSettings",[argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"],argTypes && (argTypes)[1] ? (argTypes)[1] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"]]],["action",[argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"]]]]]]],obj["beforeSend"]),Fay$$jsToFay(["defined",[["bool"]]],obj["cache"]),Fay$$jsToFay(["defined",[["function",[["user","JQXHR",[]],["user","Text",[]],["action",[argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"]]]]]]],obj["complete"]),Fay$$jsToFay(["defined",[["user","Text",[]]]],obj["contentType"]),Fay$$jsToFay(["defined",[["bool"]]],obj["crossDomain"]),Fay$$jsToFay(["defined",[argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"]]],obj["data'"]),Fay$$jsToFay(["defined",[["user","Text",[]]]],obj["dataType"]),Fay$$jsToFay(["defined",[["function",[["user","JQXHR",[]],["user","Maybe",[["user","Text",[]]]],["user","Maybe",[["user","Text",[]]]],["action",[argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"]]]]]]],obj["error'"]),Fay$$jsToFay(["defined",[["bool"]]],obj["global"]),Fay$$jsToFay(["defined",[["bool"]]],obj["ifModified"]),Fay$$jsToFay(["defined",[["bool"]]],obj["isLocal"]),Fay$$jsToFay(["defined",[["user","Text",[]]]],obj["mimeType"]),Fay$$jsToFay(["defined",[["user","Text",[]]]],obj["password"]),Fay$$jsToFay(["defined",[["bool"]]],obj["processData"]),Fay$$jsToFay(["defined",[["function",[argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"],["action",[argTypes && (argTypes)[0] ? (argTypes)[0] : (type)[0] === "automatic" ? ["automatic"] : ["unknown"]]]]]]],obj["success"]),Fay$$jsToFay(["defined",[["double"]]],obj["timeout"]),Fay$$jsToFay(["defined",[["user","Text",[]]]],obj["type'"]),Fay$$jsToFay(["defined",[["user","Text",[]]]],obj["url"]),Fay$$jsToFay(["defined",[["user","Text",[]]]],obj["username"]));
+},"Show": function(type,argTypes,obj){
+  return new JQuery._Show();
+},"Hide": function(type,argTypes,obj){
+  return new JQuery._Hide();
+},"Toggle": function(type,argTypes,obj){
+  return new JQuery._Toggle();
+},"FadeIn": function(type,argTypes,obj){
+  return new JQuery._FadeIn();
+},"FadeOut": function(type,argTypes,obj){
+  return new JQuery._FadeOut();
+},"FadeToggle": function(type,argTypes,obj){
+  return new JQuery._FadeToggle();
+},"Instantly": function(type,argTypes,obj){
+  return new JQuery._Instantly();
+},"Slow": function(type,argTypes,obj){
+  return new JQuery._Slow();
+},"Fast": function(type,argTypes,obj){
+  return new JQuery._Fast();
+},"Speed": function(type,argTypes,obj){
+  return new JQuery._Speed(Fay$$jsToFay_double(obj["slot1"]));
+},"Animation": function(type,argTypes,obj){
+  return new JQuery._Animation(Fay$$jsToFay(["user","AnimationType",[]],obj["_type"]),Fay$$jsToFay(["user","Speed",[]],obj["_speed"]),Fay$$jsToFay(["user","Maybe",[["user","Animation",[]]]],obj["_nextAnimation"]),Fay$$jsToFay(["user","JQuery",[]],obj["_element"]));
+},"WithoutDataAndEvents": function(type,argTypes,obj){
+  return new JQuery._WithoutDataAndEvents();
+},"WithDataAndEvents": function(type,argTypes,obj){
+  return new JQuery._WithDataAndEvents();
+},"DeepWithDataAndEvents": function(type,argTypes,obj){
+  return new JQuery._DeepWithDataAndEvents();
+},"KeyUp": function(type,argTypes,obj){
+  return new JQuery._KeyUp();
+},"KeyDown": function(type,argTypes,obj){
+  return new JQuery._KeyDown();
+},"KeyLeft": function(type,argTypes,obj){
+  return new JQuery._KeyLeft();
+},"KeyRight": function(type,argTypes,obj){
+  return new JQuery._KeyRight();
+},"KeyRet": function(type,argTypes,obj){
+  return new JQuery._KeyRet();
+},"SomeKey": function(type,argTypes,obj){
+  return new JQuery._SomeKey(Fay$$jsToFay_double(obj["slot1"]));
+}});
+var OpenLayers = {};
+OpenLayers.Types = {};
+OpenLayers.Types.wgs84proj = new Fay$$$(function(){
+  return Fay$$_(OpenLayers.Types.Projection)(Fay$$list("EPSG:4326"));
+});
+OpenLayers.Types.mercatorproj = new Fay$$$(function(){
+  return Fay$$_(OpenLayers.Types.Projection)(Fay$$list("EPSG:3857"));
+});
+OpenLayers.Types._Projection = function Projection(slot1){
+  this.slot1 = slot1;
+};
+OpenLayers.Types._Projection.prototype.instance = "Projection";
+OpenLayers.Types.Projection = function(slot1){
+  return new Fay$$$(function(){
+    return new OpenLayers.Types._Projection(slot1);
+  });
+};
+OpenLayers.Types._Coordinate = function Coordinate(x,y,from){
+  this.x = x;
+  this.y = y;
+  this.from = from;
+};
+OpenLayers.Types._Coordinate.prototype.instance = "Coordinate";
+OpenLayers.Types.Coordinate = function(x){
+  return function(y){
+    return function(from){
+      return new Fay$$$(function(){
+        return new OpenLayers.Types._Coordinate(x,y,from);
+      });
+    };
+  };
+};
+OpenLayers.Types.x = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).x;
+  });
+};
+OpenLayers.Types.y = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).y;
+  });
+};
+OpenLayers.Types.from = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).from;
+  });
+};
+OpenLayers.Types._Opacity = function Opacity(slot1){
+  this.slot1 = slot1;
+};
+OpenLayers.Types._Opacity.prototype.instance = "Opacity";
+OpenLayers.Types.Opacity = function(slot1){
+  return new Fay$$$(function(){
+    return new OpenLayers.Types._Opacity(slot1);
+  });
+};
+OpenLayers.Types._GeoLine = function GeoLine(pts,id,lstyle){
+  this.pts = pts;
+  this.id = id;
+  this.lstyle = lstyle;
+};
+OpenLayers.Types._GeoLine.prototype.instance = "GeoLine";
+OpenLayers.Types.GeoLine = function(pts){
+  return function(id){
+    return function(lstyle){
+      return new Fay$$$(function(){
+        return new OpenLayers.Types._GeoLine(pts,id,lstyle);
+      });
+    };
+  };
+};
+OpenLayers.Types.pts = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).pts;
+  });
+};
+OpenLayers.Types.id = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).id;
+  });
+};
+OpenLayers.Types.lstyle = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).lstyle;
+  });
+};
+OpenLayers.Types._GeoPoint = function GeoPoint(pt,id,pstyle){
+  this.pt = pt;
+  this.id = id;
+  this.pstyle = pstyle;
+};
+OpenLayers.Types._GeoPoint.prototype.instance = "GeoPoint";
+OpenLayers.Types.GeoPoint = function(pt){
+  return function(id){
+    return function(pstyle){
+      return new Fay$$$(function(){
+        return new OpenLayers.Types._GeoPoint(pt,id,pstyle);
+      });
+    };
+  };
+};
+OpenLayers.Types.pt = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).pt;
+  });
+};
+OpenLayers.Types.id = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).id;
+  });
+};
+OpenLayers.Types.pstyle = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).pstyle;
+  });
+};
+OpenLayers.Types._GeoLineStyle = function GeoLineStyle(color,width){
+  this.color = color;
+  this.width = width;
+};
+OpenLayers.Types._GeoLineStyle.prototype.instance = "GeoLineStyle";
+OpenLayers.Types.GeoLineStyle = function(color){
+  return function(width){
+    return new Fay$$$(function(){
+      return new OpenLayers.Types._GeoLineStyle(color,width);
+    });
+  };
+};
+OpenLayers.Types.color = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).color;
+  });
+};
+OpenLayers.Types.width = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).width;
+  });
+};
+OpenLayers.Types._GeoPointStyle = function GeoPointStyle(radius,fillcolor,outcolor,outwidth){
+  this.radius = radius;
+  this.fillcolor = fillcolor;
+  this.outcolor = outcolor;
+  this.outwidth = outwidth;
+};
+OpenLayers.Types._GeoPointStyle.prototype.instance = "GeoPointStyle";
+OpenLayers.Types.GeoPointStyle = function(radius){
+  return function(fillcolor){
+    return function(outcolor){
+      return function(outwidth){
+        return new Fay$$$(function(){
+          return new OpenLayers.Types._GeoPointStyle(radius,fillcolor,outcolor,outwidth);
+        });
+      };
+    };
+  };
+};
+OpenLayers.Types.radius = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).radius;
+  });
+};
+OpenLayers.Types.fillcolor = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).fillcolor;
+  });
+};
+OpenLayers.Types.outcolor = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).outcolor;
+  });
+};
+OpenLayers.Types.outwidth = function(x){
+  return new Fay$$$(function(){
+    return Fay$$_(x).outwidth;
+  });
+};
+OpenLayers.Types._Sat = function Sat(){
+};
+OpenLayers.Types._Sat.prototype.instance = "Sat";
+OpenLayers.Types.Sat = new Fay$$$(function(){
+  return new OpenLayers.Types._Sat();
+});
+OpenLayers.Types._Hyb = function Hyb(){
+};
+OpenLayers.Types._Hyb.prototype.instance = "Hyb";
+OpenLayers.Types.Hyb = new Fay$$$(function(){
+  return new OpenLayers.Types._Hyb();
+});
+OpenLayers.Types._Osm = function Osm(){
+};
+OpenLayers.Types._Osm.prototype.instance = "Osm";
+OpenLayers.Types.Osm = new Fay$$$(function(){
+  return new OpenLayers.Types._Osm();
+});
+OpenLayers.Types._OSM = function OSM(){
+};
+OpenLayers.Types._OSM.prototype.instance = "OSM";
+OpenLayers.Types.OSM = new Fay$$$(function(){
+  return new OpenLayers.Types._OSM();
+});
+OpenLayers.Types.mapQuests = new Fay$$$(function(){
+  return Fay$$list([OpenLayers.Types.Osm,OpenLayers.Types.Sat,OpenLayers.Types.Hyb]);
+});
+OpenLayers.Types.showMapSource = function($p1){
+  return new Fay$$$(function(){
+    var ms = $p1;
+    if (Fay$$_(Fay$$_(Fay$$_(Fay$$eq)(ms))(OpenLayers.Types.Sat))) {
+      return Fay$$list("sat");
+    } else {if (Fay$$_(Fay$$_(Fay$$_(Fay$$eq)(ms))(OpenLayers.Types.Hyb))) {
+        return Fay$$list("hyb");
+      } else {if (Fay$$_(Fay$$_(Fay$$_(Fay$$eq)(ms))(OpenLayers.Types.Osm))) {
+          return Fay$$list("osm");
+        } else {if (Fay$$_(Fay$$_(Fay$$_(Fay$$eq)(ms))(OpenLayers.Types.OSM))) {
+            return Fay$$list("OSM");
+          } else {if (Fay$$_(Prelude.otherwise)) {
+              return Fay$$list("showMapSource not defined, check Layer");
+            }
+          }
+        }
+      }
+    }
+  });
+};
+Fay$$objConcat(Fay$$fayToJsHash,{"Projection": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Projection"};
+  var obj_slot1 = Fay$$fayToJs_string(_obj.slot1);
+  if (undefined !== obj_slot1) {
+    obj_['slot1'] = obj_slot1;
+  }
+  return obj_;
+},"Coordinate": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Coordinate"};
+  var obj_x = Fay$$fayToJs_double(_obj.x);
+  if (undefined !== obj_x) {
+    obj_['x'] = obj_x;
+  }
+  var obj_y = Fay$$fayToJs_double(_obj.y);
+  if (undefined !== obj_y) {
+    obj_['y'] = obj_y;
+  }
+  var obj_from = Fay$$fayToJs(["user","Projectionlike",[]],_obj.from);
+  if (undefined !== obj_from) {
+    obj_['from'] = obj_from;
+  }
+  return obj_;
+},"Opacity": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Opacity"};
+  var obj_slot1 = Fay$$fayToJs(["user","Integer",[]],_obj.slot1);
+  if (undefined !== obj_slot1) {
+    obj_['slot1'] = obj_slot1;
+  }
+  return obj_;
+},"GeoLine": function(type,argTypes,_obj){
+  var obj_ = {"instance": "GeoLine"};
+  var obj_pts = Fay$$fayToJs(["list",[["user","Coordinate",[]]]],_obj.pts);
+  if (undefined !== obj_pts) {
+    obj_['pts'] = obj_pts;
+  }
+  var obj_id = Fay$$fayToJs(["user","GeoId",[]],_obj.id);
+  if (undefined !== obj_id) {
+    obj_['id'] = obj_id;
+  }
+  var obj_lstyle = Fay$$fayToJs(["user","GeoLineStyle",[]],_obj.lstyle);
+  if (undefined !== obj_lstyle) {
+    obj_['lstyle'] = obj_lstyle;
+  }
+  return obj_;
+},"GeoPoint": function(type,argTypes,_obj){
+  var obj_ = {"instance": "GeoPoint"};
+  var obj_pt = Fay$$fayToJs(["user","Coordinate",[]],_obj.pt);
+  if (undefined !== obj_pt) {
+    obj_['pt'] = obj_pt;
+  }
+  var obj_id = Fay$$fayToJs(["user","GeoId",[]],_obj.id);
+  if (undefined !== obj_id) {
+    obj_['id'] = obj_id;
+  }
+  var obj_pstyle = Fay$$fayToJs(["user","GeoPointStyle",[]],_obj.pstyle);
+  if (undefined !== obj_pstyle) {
+    obj_['pstyle'] = obj_pstyle;
+  }
+  return obj_;
+},"GeoLineStyle": function(type,argTypes,_obj){
+  var obj_ = {"instance": "GeoLineStyle"};
+  var obj_color = Fay$$fayToJs_string(_obj.color);
+  if (undefined !== obj_color) {
+    obj_['color'] = obj_color;
+  }
+  var obj_width = Fay$$fayToJs(["user","Integer",[]],_obj.width);
+  if (undefined !== obj_width) {
+    obj_['width'] = obj_width;
+  }
+  return obj_;
+},"GeoPointStyle": function(type,argTypes,_obj){
+  var obj_ = {"instance": "GeoPointStyle"};
+  var obj_radius = Fay$$fayToJs(["user","Integer",[]],_obj.radius);
+  if (undefined !== obj_radius) {
+    obj_['radius'] = obj_radius;
+  }
+  var obj_fillcolor = Fay$$fayToJs_string(_obj.fillcolor);
+  if (undefined !== obj_fillcolor) {
+    obj_['fillcolor'] = obj_fillcolor;
+  }
+  var obj_outcolor = Fay$$fayToJs_string(_obj.outcolor);
+  if (undefined !== obj_outcolor) {
+    obj_['outcolor'] = obj_outcolor;
+  }
+  var obj_outwidth = Fay$$fayToJs(["user","Integer",[]],_obj.outwidth);
+  if (undefined !== obj_outwidth) {
+    obj_['outwidth'] = obj_outwidth;
+  }
+  return obj_;
+},"Sat": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Sat"};
+  return obj_;
+},"Hyb": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Hyb"};
+  return obj_;
+},"Osm": function(type,argTypes,_obj){
+  var obj_ = {"instance": "Osm"};
+  return obj_;
+},"OSM": function(type,argTypes,_obj){
+  var obj_ = {"instance": "OSM"};
+  return obj_;
+}});
+Fay$$objConcat(Fay$$jsToFayHash,{"Projection": function(type,argTypes,obj){
+  return new OpenLayers.Types._Projection(Fay$$jsToFay_string(obj["slot1"]));
+},"Coordinate": function(type,argTypes,obj){
+  return new OpenLayers.Types._Coordinate(Fay$$jsToFay_double(obj["x"]),Fay$$jsToFay_double(obj["y"]),Fay$$jsToFay(["user","Projectionlike",[]],obj["from"]));
+},"Opacity": function(type,argTypes,obj){
+  return new OpenLayers.Types._Opacity(Fay$$jsToFay(["user","Integer",[]],obj["slot1"]));
+},"GeoLine": function(type,argTypes,obj){
+  return new OpenLayers.Types._GeoLine(Fay$$jsToFay(["list",[["user","Coordinate",[]]]],obj["pts"]),Fay$$jsToFay(["user","GeoId",[]],obj["id"]),Fay$$jsToFay(["user","GeoLineStyle",[]],obj["lstyle"]));
+},"GeoPoint": function(type,argTypes,obj){
+  return new OpenLayers.Types._GeoPoint(Fay$$jsToFay(["user","Coordinate",[]],obj["pt"]),Fay$$jsToFay(["user","GeoId",[]],obj["id"]),Fay$$jsToFay(["user","GeoPointStyle",[]],obj["pstyle"]));
+},"GeoLineStyle": function(type,argTypes,obj){
+  return new OpenLayers.Types._GeoLineStyle(Fay$$jsToFay_string(obj["color"]),Fay$$jsToFay(["user","Integer",[]],obj["width"]));
+},"GeoPointStyle": function(type,argTypes,obj){
+  return new OpenLayers.Types._GeoPointStyle(Fay$$jsToFay(["user","Integer",[]],obj["radius"]),Fay$$jsToFay_string(obj["fillcolor"]),Fay$$jsToFay_string(obj["outcolor"]),Fay$$jsToFay(["user","Integer",[]],obj["outwidth"]));
+},"Sat": function(type,argTypes,obj){
+  return new OpenLayers.Types._Sat();
+},"Hyb": function(type,argTypes,obj){
+  return new OpenLayers.Types._Hyb();
+},"Osm": function(type,argTypes,obj){
+  return new OpenLayers.Types._Osm();
+},"OSM": function(type,argTypes,obj){
+  return new OpenLayers.Types._OSM();
+}});
+OpenLayers.HtmlInternal = {};
+OpenLayers.HtmlInternal.buttonElement = new Fay$$$(function(){
+  return Fay$$list("\u003cinput\u003e");
+});
+OpenLayers.HtmlInternal.divElement = new Fay$$$(function(){
+  return Fay$$list("\u003cdiv\u003e");
+});
+OpenLayers.HtmlInternal.formElement = new Fay$$$(function(){
+  return Fay$$list("\u003cform\u003e");
+});
+OpenLayers.HtmlInternal.inputTextElement = new Fay$$$(function(){
+  return Fay$$list("\u003cinput type=text\u003e");
+});
+OpenLayers.HtmlInternal.inputCheckboxElement = new Fay$$$(function(){
+  return Fay$$list("\u003cinput type=checkbox\u003e");
+});
+OpenLayers.HtmlInternal.aElement = new Fay$$$(function(){
+  return Fay$$list("\u003ca\u003e");
+});
+OpenLayers.HtmlInternal.pElement = new Fay$$$(function(){
+  return Fay$$list("\u003cp\u003e");
+});
+OpenLayers.Html = {};
+OpenLayers.Html.addTextToHtml = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var id = $p3;
+        var element = $p2;
+        var content = $p1;
+        return Fay$$_(Fay$$_(Prelude.$36$)(Prelude.$_void))(Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.selectId$39$)(id)))(function($p1){
+          var c = $p1;
+          return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.select$39$)(element)))(function($p1){
+            var d = $p1;
+            return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(OpenLayers.Html.setHtml$39$)(content))(d)))(Fay$$_(Fay$$_(JQuery.appendTo)(c))(d));
+          });
+        }));
+      });
+    };
+  };
+};
+OpenLayers.Html.addButton = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var method = $p3;
+        var id = $p2;
+        var text = $p1;
+        return Fay$$_(Fay$$_(Prelude.$36$)(Prelude.$_void))(Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.selectId$39$)(id)))(function($p1){
+          var c = $p1;
+          return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.select$39$)(OpenLayers.HtmlInternal.buttonElement)))(function($p1){
+            var d = $p1;
+            return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.setAttr$39$)(Fay$$list("value")))(text))(d)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.setAttr$39$)(Fay$$list("type")))(Fay$$list("submit")))(d)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(OpenLayers.Html.onClick$39$)(method))(d)))(Fay$$_(Fay$$_(JQuery.appendTo)(c))(d))));
+          });
+        }));
+      });
+    };
+  };
+};
+OpenLayers.Html.addCheckbox = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var $_label = $p3;
+        var parentId = $p2;
+        var id = $p1;
+        return Fay$$_(Fay$$_(Prelude.$36$)(Prelude.$_void))(Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.selectId$39$)(parentId)))(function($p1){
+          var parent = $p1;
+          return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.select$39$)(OpenLayers.HtmlInternal.divElement)))(function($p1){
+            var div = $p1;
+            return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(OpenLayers.Html.setHtml$39$)($_label))(div)))(Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.select$39$)(OpenLayers.HtmlInternal.inputCheckboxElement)))(function($p1){
+              var checkbox = $p1;
+              return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.setAttr$39$)(Fay$$list("id")))(id))(checkbox)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(JQuery.appendTo)(div))(checkbox)))(Fay$$_(Fay$$_(JQuery.appendTo)(parent))(div)));
+            }));
+          });
+        }));
+      });
+    };
+  };
+};
+OpenLayers.Html.addDiv = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var $_label = $p3;
+        var divId = $p2;
+        var parentId = $p1;
+        return Fay$$_(Fay$$_(Prelude.$36$)(Prelude.$_void))(Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.selectId$39$)(parentId)))(function($p1){
+          var parent = $p1;
+          return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.select$39$)(OpenLayers.HtmlInternal.divElement)))(function($p1){
+            var div = $p1;
+            return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.setAttr$39$)(Fay$$list("id")))(divId))(div)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(OpenLayers.Html.setHtml$39$)($_label))(div)))(Fay$$_(Fay$$_(JQuery.appendTo)(parent))(div)));
+          });
+        }));
+      });
+    };
+  };
+};
+OpenLayers.Html.addLabel = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var id = $p3;
+        var element = $p2;
+        var parentId = $p1;
+        return Fay$$_(Fay$$_(Prelude.$36$)(Prelude.$_void))(Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.selectId$39$)(parentId)))(function($p1){
+          var parent = $p1;
+          return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.select$39$)(element)))(function($p1){
+            var d = $p1;
+            return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.setAttr$39$)(Fay$$list("id")))(id))(d)))(Fay$$_(Fay$$_(JQuery.appendTo)(parent))(d));
+          });
+        }));
+      });
+    };
+  };
+};
+OpenLayers.Html.addForm = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var formId = $p2;
+      var parentId = $p1;
+      return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.selectId$39$)(parentId)))(function($p1){
+        var parent = $p1;
+        return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Html.select$39$))(OpenLayers.HtmlInternal.formElement)))(function($p1){
+          var form = $p1;
+          return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.setAttr$39$)(Fay$$list("id")))(formId))(form)))(Fay$$_(Fay$$_(JQuery.appendTo)(parent))(form));
+        });
+      });
+    });
+  };
+};
+OpenLayers.Html.addInput = function($p1){
+  return function($p2){
+    return function($p3){
+      return function($p4){
+        return new Fay$$$(function(){
+          var defaultValue = $p4;
+          var elementId = $p3;
+          var formId = $p2;
+          var $_label = $p1;
+          return Fay$$_(Fay$$_(Prelude.$36$)(Prelude.$_void))(Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.selectId$39$)(formId)))(function($p1){
+            var parent = $p1;
+            return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.select$39$)(OpenLayers.HtmlInternal.divElement)))(function($p1){
+              var div = $p1;
+              return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(OpenLayers.Html.setHtml$39$)($_label))(div)))(Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.select$39$)(OpenLayers.HtmlInternal.inputTextElement)))(function($p1){
+                var input = $p1;
+                return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.setAttr$39$)(Fay$$list("id")))(elementId))(input)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.setAttr$39$)(Fay$$list("value")))(defaultValue))(input)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(JQuery.appendTo)(div))(input)))(Fay$$_(Fay$$_(JQuery.appendTo)(parent))(div))));
+              }));
+            });
+          }));
+        });
+      };
+    };
+  };
+};
+OpenLayers.Html.addBreakline = function($p1){
+  return new Fay$$$(function(){
+    var id = $p1;
+    return Fay$$_(Fay$$_(Prelude.$36$)(Prelude.$_void))(Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.selectId$39$)(id)))(function($p1){
+      var parent = $p1;
+      return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.select$39$)(Fay$$list("\u003cbr\u003e"))))(function($p1){
+        var $_value = $p1;
+        return Fay$$_(Fay$$_(JQuery.appendTo)(parent))($_value);
+      });
+    }));
+  });
+};
+OpenLayers.Html.getInputInt = function($p1){
+  return new Fay$$$(function(){
+    var labelId = $p1;
+    return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.selectId$39$)(labelId)))(function($p1){
+      var idinput = $p1;
+      return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(JQuery.getVal)(idinput)))(function($p1){
+        var idvalue = $p1;
+        return Fay$$_(OpenLayers.Html.toInt)(idvalue);
+      });
+    });
+  });
+};
+OpenLayers.Html.onClick$39$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","JQuery",[]],Fay$$fayToJs(["user","JQuery",[]],$p2)['click'](Fay$$fayToJs(["action",[["unknown"]]],$p1))));
+    });
+  };
+};
+OpenLayers.Html.select$39$ = function($p1){
+  return new Fay$$$(function(){
+    var s = $p1;
+    return Fay$$_(Fay$$_(Prelude.$36$)(JQuery.select))(Fay$$_(OpenLayers.Html.showString$39$)(s));
+  });
+};
+OpenLayers.Html.selectId$39$ = function($p1){
+  return new Fay$$$(function(){
+    var s = $p1;
+    return Fay$$_(Fay$$_(Prelude.$36$)(JQuery.select))(Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Html.showString$39$))(Fay$$_(Fay$$_(Prelude.$43$$43$)(Fay$$list("#")))(s)));
+  });
+};
+OpenLayers.Html.setHtml$39$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var target = $p2;
+      var content = $p1;
+      return Fay$$_(Fay$$_(JQuery.setHtml)(Fay$$_(OpenLayers.Html.showString$39$)(content)))(target);
+    });
+  };
+};
+OpenLayers.Html.setAttr$39$ = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var target = $p3;
+        var val = $p2;
+        var att = $p1;
+        return Fay$$_(Fay$$_(Fay$$_(JQuery.setAttr)(Fay$$_(OpenLayers.Html.showString$39$)(att)))(Fay$$_(OpenLayers.Html.showString$39$)(val)))(target);
+      });
+    };
+  };
+};
+OpenLayers.Html.setDoubleAttr$39$ = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var target = $p3;
+        var val = $p2;
+        var att = $p1;
+        return Fay$$_(Fay$$_(Fay$$_(JQuery.setAttr)(Fay$$_(OpenLayers.Html.showString$39$)(att)))(Fay$$_(OpenLayers.Html.showDouble$39$)(val)))(target);
+      });
+    };
+  };
+};
+OpenLayers.Html.showString$39$ = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs_string($p1));
+  });
+};
+OpenLayers.Html.showDouble$39$ = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs_double($p1));
+  });
+};
+OpenLayers.Html.toInt = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","Integer",[]],Fay$$fayToJs(["user","Text",[]],$p1)));
+  });
+};
+OpenLayers.Html.toInt$39$ = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Integer",[]],Fay$$fayToJs_string($p1));
+  });
+};
+OpenLayers.Func = {};
+OpenLayers.Func.newLayerMqt = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Object",[]],new ol.layer.Tile({source: new ol.source.MapQuest({layer: Fay$$fayToJs_string($p1)})}));
+  });
+};
+OpenLayers.Func.newLayerOSM = new Fay$$$(function(){
+  return Fay$$jsToFay(["user","Object",[]],new ol.layer.Tile({source: new ol.source.OSM()}));
+});
+OpenLayers.Func.newVector = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","Object",[]],new ol.layer.Vector({source: Fay$$fayToJs(["user","Object",[]],$p1), opacity: Fay$$fayToJs(["user","Opacity",[]],$p2).slot1*0.01})));
+    });
+  };
+};
+OpenLayers.Func.newFeature = function($p1){
+  return new Fay$$$(function(){
+    var f = $p1;
+    return (function($tmp1){
+      if (Fay$$_($tmp1) instanceof OpenLayers.Types._GeoPoint) {
+        var p = Fay$$_($tmp1).pt;
+        var id = Fay$$_($tmp1).id;
+        var s = Fay$$_($tmp1).pstyle;
+        return Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Func.newFeaturePoint))(Fay$$_(OpenLayers.Func.transformPoint$39$)(p));
+      }
+      if (Fay$$_($tmp1) instanceof OpenLayers.Types._GeoLine) {
+        var pts = Fay$$_($tmp1).pts;
+        var id = Fay$$_($tmp1).id;
+        var s = Fay$$_($tmp1).lstyle;
+        return Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Func.newFeatureLine))(Fay$$_(OpenLayers.Func.transformPoints$39$)(pts));
+      }
+      return Fay$$_(Prelude.error)(Fay$$list("newStyledFeature: the GeoFeature is not implemented yet"));
+    })(f);
+  });
+};
+OpenLayers.Func.newLineStyle = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Object",[]],[new ol.style.Style({stroke: new ol.style.Stroke({color: Fay$$fayToJs(["user","GeoLineStyle",[]],$p1).color, width: Fay$$fayToJs(["user","GeoLineStyle",[]],$p1).width})})]);
+  });
+};
+OpenLayers.Func.newPointStyle = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Object",[]],[new ol.style.Style({image: new ol.style.Circle({radius: Fay$$fayToJs(["user","GeoPointStyle",[]],$p1).radius, fill: new ol.style.Fill({color:(Fay$$fayToJs(["user","GeoPointStyle",[]],$p1).fillcolor == 'null' ? 'rgba(0,0,0,0)' : Fay$$fayToJs(["user","GeoPointStyle",[]],$p1).fillcolor)}), stroke: Fay$$fayToJs(["user","GeoPointStyle",[]],$p1).outcolor == 'null' ? null : new ol.style.Stroke({color: Fay$$fayToJs(["user","GeoPointStyle",[]],$p1).outcolor, width: Fay$$fayToJs(["user","GeoPointStyle",[]],$p1).outwidth})})})]);
+  });
+};
+OpenLayers.Func.newFeatureLine = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","Object",[]],new ol.source.GeoJSON({object:{'type':'Feature','geometry':{'type':'LineString','coordinates': Fay$$fayToJs(["list",[["tuple",[["double"],["double"]]]]],$p1)}}})));
+  });
+};
+OpenLayers.Func.newFeaturePoint = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","Object",[]],new ol.source.GeoJSON({object:{'type':'Feature','geometry':{'type':'Point','coordinates': Fay$$fayToJs(["tuple",[["double"],["double"]]],$p1)}}})));
+  });
+};
+OpenLayers.Func.newOlInput = function($p1){
+  return function($p2){
+    return function($p3){
+      return function($p4){
+        return new Fay$$$(function(){
+          return new Fay$$Monad(Fay$$jsToFay(["unknown"],(new ol.dom.Input(Fay$$fayToJs(["user","JQuery",[]],$p1)[0])).bindTo(Fay$$fayToJs_string($p2), Fay$$fayToJs(["user","Object",[]],$p3), Fay$$fayToJs_string($p4))));
+        });
+      };
+    };
+  };
+};
+OpenLayers.Func.addSelectClick = new Fay$$$(function(){
+  return new Fay$$Monad(Fay$$jsToFay(["unknown"],olc.addInteraction(new ol.interaction.Select({condition: ol.events.condition.click}))));
+});
+OpenLayers.Func.addSingleClickEvent = new Fay$$$(function(){
+  return new Fay$$Monad(Fay$$jsToFay(["unknown"],olc.on('singleclick', function (evt) {alert('Koordinate WGS: ' + ol.proj.transform([evt.coordinate[0], evt.coordinate[1]], 'EPSG:3857', 'EPSG:4326') + '\nKoordinate Mer: ' + evt.coordinate)})));
+});
+OpenLayers.Func.addBaseLayer = function($p1){
+  return new Fay$$$(function(){
+    var s = $p1;
+    return Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Func.$_void))(Fay$$_(Fay$$_(Fay$$then)(OpenLayers.Func.removeLayers))(Fay$$_(OpenLayers.Func.addMapLayer)(s)));
+  });
+};
+OpenLayers.Func.addId = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","Object",[]],(Fay$$fayToJs(["user","Integer",[]],$p2) < 1) ? '' : Fay$$fayToJs(["user","Object",[]],$p1).getSource().getFeatures()[0].setId(Fay$$fayToJs(["user","Integer",[]],$p2))));
+    });
+  };
+};
+OpenLayers.Func.addMapLayer = function($p1){
+  return new Fay$$$(function(){
+    var s = $p1;
+    if (Fay$$_(Fay$$_(Fay$$_(Fay$$eq)(s))(OpenLayers.Types.OSM))) {
+      return Fay$$_(OpenLayers.Func.addLayer)(OpenLayers.Func.newLayerOSM);
+    } else {if (Fay$$_(Fay$$_(Fay$$_(Prelude.any)(function($p1){
+        var $gen_0 = $p1;
+        return Fay$$_(Fay$$_(Fay$$eq)(s))($gen_0);
+      }))(OpenLayers.Types.mapQuests))) {
+        return Fay$$_(OpenLayers.Func.addLayer)(Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Func.newLayerMqt))(Fay$$_(OpenLayers.Types.showMapSource)(s)));
+      } else {if (Fay$$_(Prelude.otherwise)) {
+          return Fay$$_(Prelude.error)(Fay$$_(Fay$$_(Prelude.$43$$43$)(Fay$$list("wrong MapSource allowed is OSM and ")))(Fay$$_(Prelude.show)(OpenLayers.Types.mapQuests)));
+        }
+      }
+    }
+  });
+};
+OpenLayers.Func.addLayer = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"],olc.addLayer(Fay$$fayToJs(["user","Object",[]],$p1))));
+  });
+};
+OpenLayers.Func.addStyledFeature = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var o = $p2;
+      var f = $p1;
+      return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Func.newFeature)(f)))(function($p1){
+        var feature = $p1;
+        return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(OpenLayers.Func.styleFeature)(feature))(f)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(OpenLayers.Func.addFeatureId)(feature))(f)))(Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(Fay$$_(OpenLayers.Func.newVector)(feature))(o)))(function($p1){
+          var vector = $p1;
+          return Fay$$_(OpenLayers.Func.addLayer)(vector);
+        })));
+      });
+    });
+  };
+};
+OpenLayers.Func.addStyledFeatures = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var o = $p2;
+      var f = $p1;
+      return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(Fay$$_(OpenLayers.Func.map$39$)(OpenLayers.Func.newFeature))(f)))(function($p1){
+        var features = $p1;
+        return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Func.zipWithM)(OpenLayers.Func.styleFeature))(features))(f)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Func.zipWithM)(OpenLayers.Func.addFeatureId))(features))(f)))(Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Func.zipWithM)(OpenLayers.Func.newVector))(features))((function(){
+          return new Fay$$$(function(){
+            var $gen_0 = function($p1){
+              return new Fay$$$(function(){
+                var x = $p1;
+                return Fay$$list([o]);
+                return null;
+              });
+            };
+            return Fay$$_(Fay$$_(Prelude.concatMap)($gen_0))(Prelude.enumFromTo(0)(Fay$$_(Fay$$_(Fay$$sub)(Fay$$_(Prelude.length)(features)))(1)));
+          });
+        })())))(function($p1){
+          var vectors = $p1;
+          return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(OpenLayers.Func.addLayer)(Fay$$_(Prelude.head)(vectors))))(Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$$_return))(Fay$$_(Fay$$_(Fay$$_(Prelude.zipWith)(OpenLayers.Func.getFeatureAt))(vectors))((function(){
+            return new Fay$$$(function(){
+              var $gen_0 = function($p1){
+                return new Fay$$$(function(){
+                  var x = $p1;
+                  return Fay$$list([0]);
+                  return null;
+                });
+              };
+              return Fay$$_(Fay$$_(Prelude.concatMap)($gen_0))(Prelude.enumFromTo(0)(Fay$$_(Fay$$_(Fay$$sub)(Fay$$_(Prelude.length)(features)))(1)));
+            });
+          })()))))(function($p1){
+            var sources = $p1;
+            return Fay$$_(Fay$$_(OpenLayers.Func.addFeatures)(Fay$$_(Prelude.head)(vectors)))(Fay$$_(Prelude.tail)(sources));
+          }));
+        })));
+      });
+    });
+  };
+};
+OpenLayers.Func.addFeatureId = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","Object",[]],Fay$$fayToJs(["user","Object",[]],$p1).getFeatures()[0].setId(Fay$$fayToJs(["user","GeoFeature",[]],$p2).id)));
+    });
+  };
+};
+OpenLayers.Func.addFeatures = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],Fay$$fayToJs(["user","Object",[]],$p1).getSource().addFeatures(Fay$$fayToJs(["list",[["user","Object",[]]]],$p2))));
+    });
+  };
+};
+OpenLayers.Func.addPointFromLabels = function($p1){
+  return function($p2){
+    return function($p3){
+      return function($p4){
+        return function($p5){
+          return new Fay$$$(function(){
+            var s = $p5;
+            var idId = $p4;
+            var oId = $p3;
+            var yId = $p2;
+            var xId = $p1;
+            return Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Func.$_void))(Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.selectId$39$)(xId)))(function($p1){
+              var xinput = $p1;
+              return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(JQuery.getVal)(xinput)))(function($p1){
+                var xcoor = $p1;
+                return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.selectId$39$)(yId)))(function($p1){
+                  var yinput = $p1;
+                  return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(JQuery.getVal)(yinput)))(function($p1){
+                    var ycoor = $p1;
+                    return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.getInputInt)(oId)))(function($p1){
+                      var o = $p1;
+                      return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.getInputInt)(idId)))(function($p1){
+                        var i = $p1;
+                        return Fay$$_(Fay$$_(OpenLayers.Func.addStyledFeature)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(Fay$$_(OpenLayers.Func.toDouble$39$)(xcoor)))(Fay$$_(OpenLayers.Func.toDouble$39$)(ycoor)))(Fay$$_(OpenLayers.Types.Projection)(Fay$$list("EPSG:3857")))))(i))(s)))(Fay$$_(OpenLayers.Types.Opacity)(o));
+                      });
+                    });
+                  });
+                });
+              });
+            }));
+          });
+        };
+      };
+    };
+  };
+};
+OpenLayers.Func.addMapListener = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],olc.on(Fay$$fayToJs_string($p1), Fay$$fayToJs_string($p2))));
+    });
+  };
+};
+OpenLayers.Func.addMapWindowEvent = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["unknown"],olc.on(Fay$$fayToJs_string($p1), Fay$$fayToJs(["action",[["user","JQuery",[]]]],$p2))));
+    });
+  };
+};
+OpenLayers.Func.addOlDomInput = function($p1){
+  return function($p2){
+    return function($p3){
+      return function($p4){
+        return new Fay$$$(function(){
+          var method = $p4;
+          var $_value = $p3;
+          var typehtml = $p2;
+          var id = $p1;
+          return Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Func.$_void))(Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.selectId$39$)(id)))(function($p1){
+            var element = $p1;
+            return Fay$$_(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Func.newOlInput)(element))(typehtml))(method))($_value);
+          }));
+        });
+      };
+    };
+  };
+};
+OpenLayers.Func.removeLayers = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Func.$_void))(Fay$$_(Fay$$_(Fay$$bind)(OpenLayers.Func.getLayers))(function($p1){
+    var layers = $p1;
+    return Fay$$_(Fay$$_(Prelude.mapM)(OpenLayers.Func.removeLayer))(layers);
+  }));
+});
+OpenLayers.Func.removeLayer = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"],olc.removeLayer(Fay$$fayToJs(["unknown"],$p1))));
+  });
+};
+OpenLayers.Func.zoomIn = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"],olc.getView().setZoom(olc.getView().getZoom()+Fay$$fayToJs(["user","Integer",[]],$p1))));
+  });
+};
+OpenLayers.Func.zoomOut = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"],olc.getView().setZoom(olc.getView().getZoom()-Fay$$fayToJs(["user","Integer",[]],$p1))));
+  });
+};
+OpenLayers.Func.styleFeature = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var feature = $p2;
+      var object = $p1;
+      return (function($tmp1){
+        if (Fay$$_($tmp1) instanceof OpenLayers.Types._GeoPoint) {
+          var p = Fay$$_($tmp1).pt;
+          var id = Fay$$_($tmp1).id;
+          var s = Fay$$_($tmp1).pstyle;
+          return Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(OpenLayers.Func.styleFeature$39$)(object)))(Fay$$_(OpenLayers.Func.newPointStyle)(s));
+        }
+        if (Fay$$_($tmp1) instanceof OpenLayers.Types._GeoLine) {
+          var pts = Fay$$_($tmp1).pts;
+          var id = Fay$$_($tmp1).id;
+          var s = Fay$$_($tmp1).lstyle;
+          return Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(OpenLayers.Func.styleFeature$39$)(object)))(Fay$$_(OpenLayers.Func.newLineStyle)(s));
+        }
+        return Fay$$_(Prelude.error)(Fay$$list("styleFeature: the GeoFeature is not implemented yet"));
+      })(feature);
+    });
+  };
+};
+OpenLayers.Func.styleFeature$39$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","Object",[]],Fay$$fayToJs(["user","Object",[]],$p1).getFeatures()[0].setStyle(Fay$$fayToJs(["user","Object",[]],$p2))));
+    });
+  };
+};
+OpenLayers.Func.changeBaseLayer = function($p1){
+  return new Fay$$$(function(){
+    var s = $p1;
+    return Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Func.$_void))(Fay$$_(Fay$$_(Fay$$bind)(OpenLayers.Func.getLayers))(function($p1){
+      var layers = $p1;
+      return Fay$$_(Fay$$_(Fay$$then)(Fay$$_(OpenLayers.Func.addBaseLayer)(s)))(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(OpenLayers.Func.map$39$)(OpenLayers.Func.addLayer)))(Fay$$_(Prelude.tail)(layers)));
+    }));
+  });
+};
+OpenLayers.Func.setFeatureStyle = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["user","Object",[]],Fay$$fayToJs(["user","Object",[]],$p1).setStyle(Fay$$fayToJs(["user","Object",[]],$p2)));
+    });
+  };
+};
+OpenLayers.Func.setCenter$39$ = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"],olc.getView().setCenter(Fay$$fayToJs(["tuple",[["double"],["double"]]],$p1))));
+  });
+};
+OpenLayers.Func.setCenter = function($p1){
+  return new Fay$$$(function(){
+    var c = $p1;
+    return Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Func.setCenter$39$))(Fay$$_(OpenLayers.Func.transformPoint$39$)(c));
+  });
+};
+OpenLayers.Func.setCenterZoom = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var z = $p2;
+      var c = $p1;
+      return Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Func.$_void))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(OpenLayers.Func.setCenter)(c)))(Fay$$_(OpenLayers.Func.setZoom)(z)));
+    });
+  };
+};
+OpenLayers.Func.setZoom = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"],olc.getView().setZoom(Fay$$fayToJs(["user","Integer",[]],$p1))));
+  });
+};
+OpenLayers.Func.setTarget = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"],olc.setTarget(Fay$$fayToJs_string($p1))));
+  });
+};
+OpenLayers.Func.setDefaultView = new Fay$$$(function(){
+  return new Fay$$Monad(Fay$$jsToFay(["unknown"],olc.setView(new ol.View({center:[0,0],zoom:2}))));
+});
+OpenLayers.Func.setEventToHtml = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var $_function = $p2;
+      var elementId = $p1;
+      return Fay$$_(Fay$$_(Fay$$bind)($_function))(function($p1){
+        var $_value = $p1;
+        return Fay$$_(Fay$$_(Fay$$bind)(Fay$$_(OpenLayers.Html.selectId$39$)(elementId)))(function($p1){
+          var element = $p1;
+          return Fay$$_(Fay$$_(JQuery.setHtml)($_value))(element);
+        });
+      });
+    });
+  };
+};
+OpenLayers.Func.getCenter = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var fixed = $p2;
+      var proj = $p1;
+      return Fay$$_(Fay$$_(Fay$$bind)(OpenLayers.Func.getCenter_))(function($p1){
+        var c = $p1;
+        return Fay$$_(Fay$$_(OpenLayers.Func.coordFixed)(Fay$$_(Fay$$_(OpenLayers.Func.transformPointBack$39$)(proj))(c)))(fixed);
+      });
+    });
+  };
+};
+OpenLayers.Func.getZoom = new Fay$$$(function(){
+  return new Fay$$Monad(Fay$$jsToFay(["user","Text",[]],olc.getView().getZoom()));
+});
+OpenLayers.Func.getCenter_ = new Fay$$$(function(){
+  return new Fay$$Monad(Fay$$jsToFay(["tuple",[["double"],["double"]]],olc.getView().getCenter()));
+});
+OpenLayers.Func.getLayers = new Fay$$$(function(){
+  return new Fay$$Monad(Fay$$jsToFay(["list",[["user","Object",[]]]],olc.getLayers().getArray()));
+});
+OpenLayers.Func.getLayerByIndex = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Object",[]],olc.getLayers().item(Fay$$fayToJs(["user","Integer",[]],$p1)));
+  });
+};
+OpenLayers.Func.getLayerByIndex$39$ = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["user","Object",[]],olc.getLayers().item(Fay$$fayToJs(["user","Integer",[]],$p1))));
+  });
+};
+OpenLayers.Func.getFeatureId = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Integer",[]],Fay$$fayToJs(["user","Object",[]],$p1).getId());
+  });
+};
+OpenLayers.Func.getFeatureAt = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["user","Object",[]],Fay$$fayToJs(["user","Object",[]],$p1).getSource().getFeatures()[Fay$$fayToJs(["user","Integer",[]],$p2)]);
+    });
+  };
+};
+OpenLayers.Func.getFeatureLength = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["user","Integer",[]],Fay$$fayToJs(["user","Object",[]],$p1).getSource().getFeatures().length);
+  });
+};
+OpenLayers.Func.transformPointBack$39$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return Fay$$jsToFay(["tuple",[["double"],["double"]]],ol.proj.transform(Fay$$fayToJs(["tuple",[["double"],["double"]]],$p2), 'EPSG:3857', Fay$$fayToJs(["user","Projectionlike",[]],$p1).slot1));
+    });
+  };
+};
+OpenLayers.Func.transformPoint$39$ = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["tuple",[["double"],["double"]]],ol.proj.transform([Fay$$fayToJs(["user","Coordinate",[]],$p1).x, Fay$$fayToJs(["user","Coordinate",[]],$p1).y], Fay$$fayToJs(["user","Coordinate",[]],$p1).from.slot1, 'EPSG:3857'));
+  });
+};
+OpenLayers.Func.transformPoints$39$ = function($p1){
+  return new Fay$$$(function(){
+    var c = $p1;
+    return (function(){
+      return new Fay$$$(function(){
+        var $gen_0 = function($p1){
+          return new Fay$$$(function(){
+            var x = $p1;
+            return Fay$$list([Fay$$_(OpenLayers.Func.transformPoint$39$)(x)]);
+            return null;
+          });
+        };
+        return Fay$$_(Fay$$_(Prelude.concatMap)($gen_0))(c);
+      });
+    })();
+  });
+};
+OpenLayers.Func.coordFixed = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      return new Fay$$Monad(Fay$$jsToFay(["user","Text",[]],Fay$$fayToJs(["tuple",[["double"],["double"]]],$p1)[0].toFixed(Fay$$fayToJs(["user","Integer",[]],$p2)) + ',' + Fay$$fayToJs(["tuple",[["double"],["double"]]],$p1)[1].toFixed(Fay$$fayToJs(["user","Integer",[]],$p2))));
+    });
+  };
+};
+OpenLayers.Func.$_void = function($p1){
+  return new Fay$$$(function(){
+    var f = $p1;
+    return Fay$$_(Fay$$_(Fay$$then)(f))(Fay$$_(Fay$$$_return)(Fay$$unit));
+  });
+};
+OpenLayers.Func.lois = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay(["unknown"],Fay$$fayToJs(["action",[["unknown"]]],$p1));
+  });
+};
+OpenLayers.Func.toDouble$39$ = function($p1){
+  return new Fay$$$(function(){
+    return Fay$$jsToFay_double(Fay$$fayToJs(["user","Text",[]],$p1));
+  });
+};
+OpenLayers.Func.zipWithM3 = function($p1){
+  return function($p2){
+    return function($p3){
+      return function($p4){
+        return new Fay$$$(function(){
+          var is = $p4;
+          var ys = $p3;
+          var xs = $p2;
+          var f = $p1;
+          return Fay$$_(Fay$$_(Prelude.$36$)(Prelude.sequence))(Fay$$_(Fay$$_(Fay$$_(Fay$$_(Prelude.zipWith3)(f))(xs))(ys))(is));
+        });
+      };
+    };
+  };
+};
+OpenLayers.Func.zipWithM = function($p1){
+  return function($p2){
+    return function($p3){
+      return new Fay$$$(function(){
+        var ys = $p3;
+        var xs = $p2;
+        var f = $p1;
+        return Fay$$_(Fay$$_(Prelude.$36$)(Prelude.sequence))(Fay$$_(Fay$$_(Fay$$_(Prelude.zipWith)(f))(xs))(ys));
+      });
+    };
+  };
+};
+OpenLayers.Func.map$39$ = function($p1){
+  return function($p2){
+    return new Fay$$$(function(){
+      var xs = $p2;
+      var f = $p1;
+      return Fay$$_(Prelude.sequence)(Fay$$_(Fay$$_(Prelude.map)(f))(xs));
+    });
+  };
+};
+var Tutorial = {};
+Tutorial.Traffic = {};
+Tutorial.Traffic.uStationSize = 3;
+Tutorial.Traffic.uLineSize = 2;
+Tutorial.Traffic.u1Color = new Fay$$$(function(){
+  return Fay$$list("red");
+});
+Tutorial.Traffic.u1StationStyle = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPointStyle)(Tutorial.Traffic.uStationSize))(Tutorial.Traffic.u1Color))(Tutorial.Traffic.u1Color))(1);
+});
+Tutorial.Traffic.u1LineStyle = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(OpenLayers.Types.GeoLineStyle)(Tutorial.Traffic.u1Color))(Tutorial.Traffic.uLineSize);
+});
+Tutorial.Traffic.u2Color = new Fay$$$(function(){
+  return Fay$$list("#8904B1");
+});
+Tutorial.Traffic.u2StationStyle = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPointStyle)(Tutorial.Traffic.uStationSize))(Tutorial.Traffic.u2Color))(Tutorial.Traffic.u2Color))(1);
+});
+Tutorial.Traffic.u2LineStyle = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(OpenLayers.Types.GeoLineStyle)(Tutorial.Traffic.u2Color))(Tutorial.Traffic.uLineSize);
+});
+Tutorial.Traffic.u3Color = new Fay$$$(function(){
+  return Fay$$list("orange");
+});
+Tutorial.Traffic.u3StationStyle = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPointStyle)(Tutorial.Traffic.uStationSize))(Tutorial.Traffic.u3Color))(Tutorial.Traffic.u3Color))(1);
+});
+Tutorial.Traffic.u3LineStyle = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(OpenLayers.Types.GeoLineStyle)(Tutorial.Traffic.u3Color))(Tutorial.Traffic.uLineSize);
+});
+Tutorial.Traffic.u4Color = new Fay$$$(function(){
+  return Fay$$list("green");
+});
+Tutorial.Traffic.u4StationStyle = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPointStyle)(Tutorial.Traffic.uStationSize))(Tutorial.Traffic.u4Color))(Tutorial.Traffic.u4Color))(1);
+});
+Tutorial.Traffic.u4LineStyle = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(OpenLayers.Types.GeoLineStyle)(Tutorial.Traffic.u4Color))(Tutorial.Traffic.uLineSize);
+});
+Tutorial.Traffic.u4_01 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.26139))(48.1975))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_02 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.27528))(48.1925))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_03 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.28639))(48.19111))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_04 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.29473))(48.18972))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_05 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.30389))(48.18778))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_06 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.3189))(48.18555))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_07 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.32834))(48.18361))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_08 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.33472))(48.18472))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_09 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.3425))(48.18834))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_10 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.35445))(48.19278))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_11 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.35806))(48.19667))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_12 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.36889))(48.20015))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_13 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.37889))(48.20278))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_14 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.385))(48.20612))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_15 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.3775))(48.2115))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_16 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.37195))(48.21611))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_17 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.36751))(48.22194))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_18 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.36361))(48.22778))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_19 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.35806))(48.23472))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4_20 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.36612))(48.24888))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u4 = new Fay$$$(function(){
+  return Fay$$list([Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_01))(40001))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_02))(40002))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_03))(40003))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_04))(40004))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_05))(40005))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_06))(40006))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_07))(40007))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_08))(40008))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_09))(40009))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_10))(40010))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_11))(40011))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_12))(40012))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_13))(40013))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_14))(40014))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_15))(40015))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_16))(40016))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_17))(40017))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_18))(40018))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_19))(40019))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u4_20))(40020))(Tutorial.Traffic.u4StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoLine)(Fay$$list([Tutorial.Traffic.u4_01,Tutorial.Traffic.u4_02,Tutorial.Traffic.u4_03,Tutorial.Traffic.u4_04,Tutorial.Traffic.u4_05,Tutorial.Traffic.u4_06,Tutorial.Traffic.u4_07,Tutorial.Traffic.u4_08,Tutorial.Traffic.u4_09,Tutorial.Traffic.u4_10,Tutorial.Traffic.u4_11,Tutorial.Traffic.u4_12,Tutorial.Traffic.u4_13,Tutorial.Traffic.u4_14,Tutorial.Traffic.u4_15,Tutorial.Traffic.u4_16,Tutorial.Traffic.u4_17,Tutorial.Traffic.u4_18,Tutorial.Traffic.u4_19,Tutorial.Traffic.u4_20])))(41001))(Tutorial.Traffic.u4LineStyle)]);
+});
+Tutorial.Traffic.u3_01 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.42024))(48.17001))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_02 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.41389))(48.17611))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_03 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.41139))(48.17944))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_04 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.41722))(48.18528))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_05 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.415))(48.19084))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_06 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.40667))(48.19445))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_07 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.39972))(48.1975))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_08 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.39223))(48.20222))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_09 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.385))(48.20639))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_10 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.37917))(48.2075))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_11 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.37222))(48.20833))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_12 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.365))(48.20944))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_13 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.35834))(48.20501))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_14 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.35222))(48.19917))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_15 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.34611))(48.19722))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_16 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.33861))(48.19695))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_17 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.32861))(48.19778))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_18 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.31972))(48.19778))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_19 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.31167))(48.19972))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_20 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.3089))(48.20444))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3_21 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.31111))(48.21195))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u3 = new Fay$$$(function(){
+  return Fay$$list([Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_01))(30001))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_02))(30002))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_03))(30003))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_04))(30004))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_05))(30005))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_06))(30006))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_07))(30007))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_08))(30008))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_09))(30009))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_10))(30010))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_11))(30011))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_12))(30012))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_13))(30013))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_14))(30014))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_15))(30015))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_16))(30016))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_17))(30017))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_18))(30018))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_19))(30019))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_20))(30020))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u3_21))(30021))(Tutorial.Traffic.u3StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoLine)(Fay$$list([Tutorial.Traffic.u3_01,Tutorial.Traffic.u3_02,Tutorial.Traffic.u3_03,Tutorial.Traffic.u3_04,Tutorial.Traffic.u3_05,Tutorial.Traffic.u3_06,Tutorial.Traffic.u3_07,Tutorial.Traffic.u3_08,Tutorial.Traffic.u3_09,Tutorial.Traffic.u3_10,Tutorial.Traffic.u3_11,Tutorial.Traffic.u3_12,Tutorial.Traffic.u3_13,Tutorial.Traffic.u3_14,Tutorial.Traffic.u3_15,Tutorial.Traffic.u3_16,Tutorial.Traffic.u3_17,Tutorial.Traffic.u3_18,Tutorial.Traffic.u3_19,Tutorial.Traffic.u3_20,Tutorial.Traffic.u3_21])))(31001))(Tutorial.Traffic.u3LineStyle)]);
+});
+Tutorial.Traffic.u2_01 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.3691))(48.20028))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u2_02 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.36139))(48.20251))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u2_03 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.35833))(48.20556))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u2_04 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.35528))(48.21056))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u2_05 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.36305))(48.21528))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u2_06 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.37195))(48.21639))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u2_07 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.38074))(48.21908))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u2_08 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.39133))(48.21875))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u2_09 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.4064))(48.2177))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u2_10 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.41376))(48.21466))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u2_11 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.42095))(48.2103))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u2 = new Fay$$$(function(){
+  return Fay$$list([Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u2_01))(20001))(Tutorial.Traffic.u2StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u2_02))(20002))(Tutorial.Traffic.u2StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u2_03))(20003))(Tutorial.Traffic.u2StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u2_04))(20004))(Tutorial.Traffic.u2StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u2_05))(20005))(Tutorial.Traffic.u2StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u2_06))(20006))(Tutorial.Traffic.u2StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u2_07))(20007))(Tutorial.Traffic.u2StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u2_08))(20008))(Tutorial.Traffic.u2StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u2_09))(20009))(Tutorial.Traffic.u2StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u2_10))(20010))(Tutorial.Traffic.u2StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u2_11))(20011))(Tutorial.Traffic.u2StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoLine)(Fay$$list([Tutorial.Traffic.u2_01,Tutorial.Traffic.u2_02,Tutorial.Traffic.u2_03,Tutorial.Traffic.u2_04,Tutorial.Traffic.u2_05,Tutorial.Traffic.u2_06,Tutorial.Traffic.u2_07,Tutorial.Traffic.u2_08,Tutorial.Traffic.u2_09,Tutorial.Traffic.u2_10,Tutorial.Traffic.u2_11])))(21001))(Tutorial.Traffic.u2LineStyle)]);
+});
+Tutorial.Traffic.u1_01 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.37778))(48.175))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_02 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.37612))(48.17945))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_03 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.37278))(48.18751))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_04 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.37056))(48.19389))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_05 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.36889))(48.20028))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_06 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.37194))(48.20836))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_07 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.3775))(48.21167))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_08 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.38583))(48.21556))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_09 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.39333))(48.21944))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_10 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.40139))(48.2239))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_11 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.41055))(48.22889))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_13 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.41611))(48.23305))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_14 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.42436))(48.23811))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_15 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.4339))(48.24362))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_16 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.44333))(48.25041))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_17 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.44922))(48.25702))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_18 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.45158))(48.26277))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_19 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.44773))(48.27164))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1_20 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.45164))(48.27719))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.Traffic.u1 = new Fay$$$(function(){
+  return Fay$$list([Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_01))(10001))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_02))(10002))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_03))(10003))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_04))(10004))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_05))(10005))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_06))(10006))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_07))(10007))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_08))(10008))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_09))(10009))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_10))(10010))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_11))(10011))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_13))(10013))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_14))(10014))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_15))(10015))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_16))(10016))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_17))(10017))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_18))(10018))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_19))(10019))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.Traffic.u1_20))(10020))(Tutorial.Traffic.u1StationStyle),Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoLine)(Fay$$list([Tutorial.Traffic.u1_01,Tutorial.Traffic.u1_02,Tutorial.Traffic.u1_03,Tutorial.Traffic.u1_04,Tutorial.Traffic.u1_05,Tutorial.Traffic.u1_06,Tutorial.Traffic.u1_07,Tutorial.Traffic.u1_08,Tutorial.Traffic.u1_09,Tutorial.Traffic.u1_10,Tutorial.Traffic.u1_11,Tutorial.Traffic.u1_13,Tutorial.Traffic.u1_14,Tutorial.Traffic.u1_15,Tutorial.Traffic.u1_16,Tutorial.Traffic.u1_17,Tutorial.Traffic.u1_18,Tutorial.Traffic.u1_19,Tutorial.Traffic.u1_20])))(11001))(Tutorial.Traffic.u1LineStyle)]);
+});
+Tutorial.OlApp = {};
+Tutorial.OlApp.zoomlevel = 11;
+Tutorial.OlApp.defaultopacity = new Fay$$$(function(){
+  return Fay$$_(OpenLayers.Types.Opacity)(80);
+});
+Tutorial.OlApp.coor1 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.369))(48.196))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.OlApp.coor2 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.37))(48.195))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.OlApp.coor3 = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.371))(48.194))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.OlApp.vienna = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(16.397))(48.219))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.OlApp.rome = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(12.5))(41.9))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.OlApp.bern = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)(7.4458))(46.95))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.OlApp.madrid = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.Coordinate)((-(3.683333))))(40.4))(OpenLayers.Types.wgs84proj);
+});
+Tutorial.OlApp.mypointstyle = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPointStyle)(4))(Fay$$list("green")))(Fay$$list("black")))(2);
+});
+Tutorial.OlApp.mylinestyle = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(OpenLayers.Types.GeoLineStyle)(Fay$$list("green")))(3);
+});
+Tutorial.OlApp.mypoint = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoPoint)(Tutorial.OlApp.vienna))(301))(Tutorial.OlApp.mypointstyle);
+});
+Tutorial.OlApp.myline = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Fay$$_(OpenLayers.Types.GeoLine)(Fay$$list([Tutorial.OlApp.coor1,Tutorial.OlApp.coor2,Tutorial.OlApp.coor3])))(101))(Tutorial.OlApp.mylinestyle);
+});
+Tutorial.OlApp.descId = new Fay$$$(function(){
+  return Fay$$list("mapdesc");
+});
+Tutorial.OlApp.formId = new Fay$$$(function(){
+  return Fay$$list("forminput");
+});
+Tutorial.OlApp.hochinputId = new Fay$$$(function(){
+  return Fay$$list("xinput");
+});
+Tutorial.OlApp.rechtsinputId = new Fay$$$(function(){
+  return Fay$$list("yinput");
+});
+Tutorial.OlApp.opacityinputId = new Fay$$$(function(){
+  return Fay$$list("opacinput");
+});
+Tutorial.OlApp.idinputId = new Fay$$$(function(){
+  return Fay$$list("idinputId");
+});
+Tutorial.OlApp.zoomlabel = new Fay$$$(function(){
+  return Fay$$list("zoomlabel");
+});
+Tutorial.OlApp.wgslabel = new Fay$$$(function(){
+  return Fay$$list("wgslabel");
+});
+Tutorial.OlApp.mercatorlabel = new Fay$$$(function(){
+  return Fay$$list("mercatorlabel");
+});
+Tutorial.OlApp.visiblecheckboxU1 = new Fay$$$(function(){
+  return Fay$$list("opacitycheckboxU1");
+});
+Tutorial.OlApp.visiblecheckboxU2 = new Fay$$$(function(){
+  return Fay$$list("opacitycheckboxU2");
+});
+Tutorial.OlApp.visiblecheckboxU3 = new Fay$$$(function(){
+  return Fay$$list("opacitycheckboxU3");
+});
+Tutorial.OlApp.visiblecheckboxU4 = new Fay$$$(function(){
+  return Fay$$list("opacitycheckboxU4");
+});
+Tutorial.OlApp.designTutorialMap = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Func.$_void))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(OpenLayers.Func.setCenter)(Tutorial.OlApp.vienna)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(OpenLayers.Func.setZoom)(Tutorial.OlApp.zoomlevel)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(OpenLayers.Func.addStyledFeature)(Tutorial.OlApp.myline)))(Fay$$_(OpenLayers.Types.Opacity)(0))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(OpenLayers.Func.addStyledFeature)(Tutorial.OlApp.mypoint)))(Fay$$_(OpenLayers.Types.Opacity)(0))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(OpenLayers.Func.addStyledFeatures)(Tutorial.Traffic.u1))(Tutorial.OlApp.defaultopacity)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(OpenLayers.Func.addStyledFeatures)(Tutorial.Traffic.u2))(Tutorial.OlApp.defaultopacity)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(OpenLayers.Func.addStyledFeatures)(Tutorial.Traffic.u3))(Tutorial.OlApp.defaultopacity)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(OpenLayers.Func.addStyledFeatures)(Tutorial.Traffic.u4))(Tutorial.OlApp.defaultopacity)))(Fay$$_(Fay$$_(Fay$$then)(OpenLayers.Func.addSelectClick))(Fay$$_(Fay$$_(Fay$$then)(OpenLayers.Func.addSingleClickEvent))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.addDiv)(Tutorial.OlApp.descId))(Fay$$list("div0")))(Fay$$list("Klicke in die Karte um Koordinaten zu erhalten."))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(OpenLayers.Html.addBreakline)(Tutorial.OlApp.descId)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(OpenLayers.Html.addForm)(Tutorial.OlApp.descId))(Tutorial.OlApp.formId)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.addInput)(Fay$$list("Mercator Hochwert: ")))(Tutorial.OlApp.formId))(Tutorial.OlApp.hochinputId))(Fay$$list("1819207"))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.addInput)(Fay$$list("Mercator Rechtswert: ")))(Tutorial.OlApp.formId))(Tutorial.OlApp.rechtsinputId))(Fay$$list("6141206"))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.addInput)(Fay$$list("Deckkraft: ")))(Tutorial.OlApp.formId))(Tutorial.OlApp.opacityinputId))(Fay$$list("90"))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.addInput)(Fay$$list("Id: ")))(Tutorial.OlApp.formId))(Tutorial.OlApp.idinputId))(Fay$$list("1000"))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(Fay$$_(OpenLayers.Html.addButton)(Fay$$list("Symbol einsetzen")))(Tutorial.OlApp.descId)))(Fay$$_(Fay$$_(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Func.addPointFromLabels)(Tutorial.OlApp.hochinputId))(Tutorial.OlApp.rechtsinputId))(Tutorial.OlApp.opacityinputId))(Tutorial.OlApp.idinputId))(Tutorial.OlApp.mypointstyle))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(OpenLayers.Html.addBreakline)(Tutorial.OlApp.descId)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(OpenLayers.Html.addBreakline)(Tutorial.OlApp.descId)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(Fay$$_(OpenLayers.Html.addButton)(Fay$$list("Wechsel Basiskarte Satellit")))(Tutorial.OlApp.descId)))(Fay$$_(OpenLayers.Func.changeBaseLayer)(OpenLayers.Types.Sat))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(Fay$$_(OpenLayers.Html.addButton)(Fay$$list("Wechsel Basiskarte OpenStreetMap")))(Tutorial.OlApp.descId)))(Fay$$_(OpenLayers.Func.changeBaseLayer)(OpenLayers.Types.OSM))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(OpenLayers.Html.addBreakline)(Tutorial.OlApp.descId)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(OpenLayers.Html.addBreakline)(Tutorial.OlApp.descId)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(Fay$$_(OpenLayers.Html.addButton)(Fay$$list("Wien")))(Tutorial.OlApp.descId)))(Fay$$_(OpenLayers.Func.setCenter)(Tutorial.OlApp.vienna))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(Fay$$_(OpenLayers.Html.addButton)(Fay$$list("Rom")))(Tutorial.OlApp.descId)))(Fay$$_(Fay$$_(OpenLayers.Func.setCenterZoom)(Tutorial.OlApp.rome))(Tutorial.OlApp.zoomlevel))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(Fay$$_(OpenLayers.Html.addButton)(Fay$$list("Madrid")))(Tutorial.OlApp.descId)))(Fay$$_(Fay$$_(OpenLayers.Func.setCenterZoom)(Tutorial.OlApp.madrid))(Tutorial.OlApp.zoomlevel))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(OpenLayers.Html.addBreakline)(Tutorial.OlApp.descId)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(Fay$$_(OpenLayers.Html.addButton)(Fay$$list("Zoom +")))(Tutorial.OlApp.descId)))(Fay$$_(OpenLayers.Func.zoomIn)(1))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(Fay$$_(OpenLayers.Html.addButton)(Fay$$list("Zoom -")))(Tutorial.OlApp.descId)))(Fay$$_(OpenLayers.Func.zoomOut)(1))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(OpenLayers.Html.addBreakline)(Tutorial.OlApp.descId)))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.addCheckbox)(Tutorial.OlApp.visiblecheckboxU1))(Fay$$list("table1")))(Fay$$list("U1 "))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.addCheckbox)(Tutorial.OlApp.visiblecheckboxU2))(Fay$$list("table2")))(Fay$$list("U2 "))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.addCheckbox)(Tutorial.OlApp.visiblecheckboxU3))(Fay$$list("table3")))(Fay$$list("U3 "))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.addCheckbox)(Tutorial.OlApp.visiblecheckboxU4))(Fay$$list("table4")))(Fay$$list("U4 "))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Func.addOlDomInput)(Tutorial.OlApp.visiblecheckboxU1))(Fay$$list("checked")))(Fay$$list("visible"))))(Fay$$_(OpenLayers.Func.getLayerByIndex)(3))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Func.addOlDomInput)(Tutorial.OlApp.visiblecheckboxU2))(Fay$$list("checked")))(Fay$$list("visible"))))(Fay$$_(OpenLayers.Func.getLayerByIndex)(4))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Func.addOlDomInput)(Tutorial.OlApp.visiblecheckboxU3))(Fay$$list("checked")))(Fay$$list("visible"))))(Fay$$_(OpenLayers.Func.getLayerByIndex)(5))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Func.addOlDomInput)(Tutorial.OlApp.visiblecheckboxU4))(Fay$$list("checked")))(Fay$$list("visible"))))(Fay$$_(OpenLayers.Func.getLayerByIndex)(6))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.addLabel)(Tutorial.OlApp.zoomlabel))(Fay$$list("\u003cdiv\u003e")))(Fay$$list("zl1"))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.addLabel)(Tutorial.OlApp.wgslabel))(Fay$$list("\u003cdiv\u003e")))(Fay$$list("wl1"))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Fay$$_(OpenLayers.Html.addLabel)(Tutorial.OlApp.mercatorlabel))(Fay$$list("\u003cdiv\u003e")))(Fay$$list("ml1"))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(OpenLayers.Func.addMapWindowEvent)(Fay$$list("moveend"))))(Fay$$_(Fay$$_(OpenLayers.Func.setEventToHtml)(Tutorial.OlApp.zoomlabel))(OpenLayers.Func.getZoom))))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(OpenLayers.Func.addMapWindowEvent)(Fay$$list("moveend"))))(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(OpenLayers.Func.setEventToHtml)(Tutorial.OlApp.wgslabel)))(Fay$$_(Fay$$_(OpenLayers.Func.getCenter)(OpenLayers.Types.wgs84proj))(5)))))(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(OpenLayers.Func.addMapWindowEvent)(Fay$$list("moveend"))))(Fay$$_(Fay$$_(Prelude.$36$)(Fay$$_(OpenLayers.Func.setEventToHtml)(Tutorial.OlApp.mercatorlabel)))(Fay$$_(Fay$$_(OpenLayers.Func.getCenter)(OpenLayers.Types.mercatorproj))(1))))))))))))))))))))))))))))))))))))))))))))))));
+});
+var OlApp = {};
+OlApp.targetId = new Fay$$$(function(){
+  return Fay$$list("map");
+});
+OlApp.designMap = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Func.$_void))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(OpenLayers.Func.addBaseLayer)(OpenLayers.Types.OSM)))(Tutorial.OlApp.designTutorialMap));
+});
+OpenLayers.addDefaultMap = new Fay$$$(function(){
+  return new Fay$$Monad(Fay$$jsToFay(["unknown"],olmap = new ol.Map({renderer: 'canvas'})));
+});
+OpenLayers.defineCode = new Fay$$$(function(){
+  return new Fay$$Monad(Fay$$jsToFay(["unknown"],olc = $(olmap)[0]));
+});
+OpenLayers.olwrapperLoad = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Prelude.$36$)(OpenLayers.Func.$_void))(Fay$$_(Fay$$_(Fay$$then)(OpenLayers.addDefaultMap))(Fay$$_(Fay$$_(Fay$$then)(OpenLayers.defineCode))(Fay$$_(Fay$$_(Fay$$then)(Fay$$_(OpenLayers.Func.setTarget)(OlApp.targetId)))(Fay$$_(Fay$$_(Fay$$then)(OpenLayers.Func.setDefaultView))(OlApp.designMap)))));
+});
+var Index = {};
+Index.addOnload = function($p1){
+  return new Fay$$$(function(){
+    return new Fay$$Monad(Fay$$jsToFay(["unknown"],window.addEventListener("load", Fay$$fayToJs(["action",[["unknown"]]],$p1))));
+  });
+};
+Index.main = new Fay$$$(function(){
+  return Fay$$_(Index.addOnload)(Index.onload);
+});
+Index.$_void = function($p1){
+  return new Fay$$$(function(){
+    var f = $p1;
+    return Fay$$_(Fay$$_(Fay$$then)(f))(Fay$$_(Fay$$$_return)(Fay$$unit));
+  });
+};
+Index.onload = new Fay$$$(function(){
+  return Fay$$_(Fay$$_(Prelude.$36$)(Index.$_void))(OpenLayers.olwrapperLoad);
+});
+
+;
+Fay$$_(Index.main,true);
+
diff --git a/snaplets/fay/src/Index.hs b/snaplets/fay/src/Index.hs
new file mode 100644
--- /dev/null
+++ b/snaplets/fay/src/Index.hs
@@ -0,0 +1,26 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE RebindableSyntax  #-}
+{-# LANGUAGE EmptyDataDecls    #-}
+{-# OPTIONS -Wall -fno-warn-name-shadowing -fno-warn-unused-do-bind #-}
+
+module Index where
+
+import           Prelude          hiding (void)
+import           JQuery           hiding (Element)
+import           Fay.Text                (Text, fromString)
+import           FFI
+import           OpenLayers -- include OpenLayers, to wrap the OlApp
+
+
+addOnload :: Fay f -> Fay ()
+addOnload = ffi "window.addEventListener(\"load\", %1)"
+
+main :: Fay ()
+main = addOnload onload
+
+void :: Fay f -> Fay ()
+void f = f >> return ()
+
+onload :: Fay ()
+onload = void $ do
+  olwrapperLoad  -- include OpenLayers
diff --git a/snaplets/heist/templates/index.tpl b/snaplets/heist/templates/index.tpl
new file mode 100644
--- /dev/null
+++ b/snaplets/heist/templates/index.tpl
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+
+<!-- minimum code
+<html>
+	<head>
+		<script src="http://openlayers.org/en/v3.1.1/build/ol.js"/>
+		<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"/>
+		<script src="/fay/Index.js"/>
+	</head>
+	<body>Hello Map
+		<div id="map" style="width: 200px; height: 200px;"/>
+	</body>
+</html>
+-->
+
+
+<!-- tutorial -->
+<html>
+	<head>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+		<title>Haskell OpenLayers Wrapper - diploma thesis TU Vienna 2014/2015 - Geoinformation</title>
+		<script src="http://openlayers.org/en/v3.1.1/build/ol.js"/>
+		<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"/>
+		<script src="/fay/Index.js"/>
+		<style type="text/css">
+			* {
+				font-family: Arial, Verdana, Helvetica, sans-serif;
+			}
+			#map {
+				width: 500px;
+				height: 300px;
+			}
+		</style>
+	</head>
+	<body>
+		<center>
+			<p><b>Haskell OpenLayers Wrapper</b></p>
+			
+			<div id="mapdesc"></div>
+			
+			<table style="padding: 12px;">
+				<tr>
+					<td id="table1" style="color: red;    padding-right: 12px"/>
+					<td id="table2" style="color: purple; padding-right: 12px"/>
+					<td id="table3" style="color: orange; padding-right: 12px"/>
+					<td id="table4" style="color: green"/>
+				</tr>
+			</table>
+			
+			<div id="map"></div>
+			
+			<table style="padding: 12px;">
+				<tr>
+					<td>Zoomlevel:</td>
+					<td>
+						<div id="zoomlabel"     align="center" style="padding: 4px"></div>
+					</td>
+				</tr>
+				<tr>
+					<td>Kartenzentrum (WGS 84):</td>
+					<td>
+						<div id="wgslabel"      align="center" style="padding: 4px"></div>
+					</td>
+				</tr>
+				<tr>
+					<td>Kartenzentrum (Mercator):</td>
+					<td>
+						<div id="mercatorlabel" align="center" style="padding: 4px"></div>
+					</td>
+				</tr>
+			</table>
+		</center>
+	</body>
+</html>
diff --git a/src/Application.hs b/src/Application.hs
new file mode 100644
--- /dev/null
+++ b/src/Application.hs
@@ -0,0 +1,20 @@
+{-# LANGUAGE NoImplicitPrelude #-}
+{-# LANGUAGE TemplateHaskell   #-}
+
+module Application where
+
+import Control.Lens
+import Snap.Snaplet
+import Snap.Snaplet.Heist
+import Snap.Snaplet.Fay
+
+data App = App { 
+       _heist :: Snaplet (Heist App)
+     , _fay   :: Snaplet Fay
+        }
+
+makeLenses ''App
+
+instance HasHeist App where heistLens = subSnaplet heist
+
+type AppHandler = Handler App App
diff --git a/src/Main.hs b/src/Main.hs
new file mode 100644
--- /dev/null
+++ b/src/Main.hs
@@ -0,0 +1,35 @@
+{-# LANGUAGE CPP               #-}
+{-# LANGUAGE TemplateHaskell   #-}
+
+module Main where
+
+import           Control.Exception (SomeException, try)
+
+import           Data.Text
+import           Snap.Http.Server
+import           Snap.Snaplet
+import           Snap.Snaplet.Config
+import           Snap.Core
+import           System.IO
+import           Site
+
+#ifdef DEVELOPMENT
+import           Snap.Loader.Dynamic
+#else
+import           Snap.Loader.Static
+#endif
+
+getConf :: IO (Config Snap AppConfig)
+getConf = commandLineAppConfig defaultConfig
+
+getActions :: Config Snap AppConfig -> IO (Snap (), IO ())
+getActions conf = do
+    (msgs, site, cleanup) <- runSnaplet (appEnvironment =<< getOther conf) app
+    hPutStrLn stderr $ unpack msgs
+    return (site, cleanup)
+
+main :: IO ()
+main = do
+    (conf, site, cleanup) <- $(loadSnapTH [| getConf |] 'getActions ["snaplets/heist/templates"])
+    _ <- try $ httpServe conf site :: IO (Either SomeException ())
+    cleanup
diff --git a/src/Site.hs b/src/Site.hs
new file mode 100644
--- /dev/null
+++ b/src/Site.hs
@@ -0,0 +1,28 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE NoImplicitPrelude #-}
+{-# LANGUAGE PackageImports #-}
+
+module Site ( app ) where
+
+import               Data.ByteString     (ByteString)
+import               Snap.Snaplet
+import               Snap.Snaplet.Fay
+import               Snap.Snaplet.Heist
+import               Snap.Util.FileServe
+import  "base"       Prelude
+
+----------------------------------------------------------
+import           Application
+
+routes :: [(ByteString, AppHandler ())]
+routes = [
+           ("/fay",    with fay fayServe)
+         , ("/static", serveDirectory "static")
+         ]
+
+app :: SnapletInit App App
+app = makeSnaplet "app" "" Nothing $ do
+    h <- nestSnaplet "" heist ( heistInit "templates" )
+    f <- nestSnaplet "fay" fay initFay
+    addRoutes routes
+    return $ App h f
diff --git a/web/OlApp.hs b/web/OlApp.hs
new file mode 100644
--- /dev/null
+++ b/web/OlApp.hs
@@ -0,0 +1,20 @@
+{-|
+Module      :  OpenLayers Wrapper Webdevelopment
+Description :  to create a web application
+-}
+module OlApp where
+
+import           Prelude hiding (void)
+import           OpenLayers.Func
+import           OpenLayers.Types
+import           Tutorial.OlApp (designTutorialMap)
+
+-- | ID for the combination of the HTML-Element map and the OpenLayers object 
+targetId = "map"
+
+-- | definition of the behaviour for OpenLayers
+designMap :: Fay ()
+designMap = void $ do
+    addBaseLayer OSM
+    designTutorialMap
+
diff --git a/web/Tutorial/OlApp.hs b/web/Tutorial/OlApp.hs
new file mode 100644
--- /dev/null
+++ b/web/Tutorial/OlApp.hs
@@ -0,0 +1,133 @@
+module Tutorial.OlApp where
+
+import           Prelude hiding (void)
+import           OpenLayers.Func
+import           OpenLayers.Types
+import           OpenLayers.Html
+import           Tutorial.Traffic
+
+zoomlevel = 11
+defaultopacity = Opacity 80
+
+coor1 = Coordinate 16.369 48.196 wgs84proj
+coor2 = Coordinate 16.370 48.195 wgs84proj
+coor3 = Coordinate 16.371 48.194 wgs84proj
+
+vienna = Coordinate 16.397      48.219 wgs84proj
+rome   = Coordinate 12.5        41.9   wgs84proj
+bern   = Coordinate 7.4458      46.95  wgs84proj
+madrid = Coordinate (-3.683333) 40.4   wgs84proj
+
+-- Styles
+mypointstyle = GeoPointStyle 4 "green" "black" 2
+mylinestyle  = GeoLineStyle  "green" 3
+
+-- Features
+mypoint = GeoPoint vienna                301 mypointstyle
+myline  = GeoLine  [coor1, coor2, coor3] 101 mylinestyle
+
+-- IDs for the html-tags
+
+descId = "mapdesc"  -- where to input the html-elements, defined in index.tpl
+
+formId = "forminput"
+hochinputId = "xinput"
+rechtsinputId = "yinput"
+opacityinputId = "opacinput"
+idinputId = "idinputId"
+
+zoomlabel = "zoomlabel"
+wgslabel = "wgslabel"
+mercatorlabel = "mercatorlabel"
+visiblecheckboxU1 = "opacitycheckboxU1"
+visiblecheckboxU2 = "opacitycheckboxU2"
+visiblecheckboxU3 = "opacitycheckboxU3"
+visiblecheckboxU4 = "opacitycheckboxU4"
+
+
+designTutorialMap :: Fay ()
+designTutorialMap = void $ do
+    -- baselayer loaded before
+    
+    -- init center and zoom
+    setCenter vienna
+    setZoom zoomlevel
+    
+    --  ADD LAYERS
+    --  LAYER Index 1      --  add only one feature
+    addStyledFeature myline  $ Opacity 0    --  hiding with Opacity 0
+    --  LAYER Index 2      --  add only one feature
+    addStyledFeature mypoint $ Opacity 0    --  hiding with Opacity 0
+    --  LAYER Index 3      --  or add more with a list
+    addStyledFeatures u1 defaultopacity
+    --  LAYER Index 4
+    addStyledFeatures u2 defaultopacity
+    --  LAYER Index 5
+    addStyledFeatures u3 defaultopacity
+    --  LAYER Index 6
+    addStyledFeatures u4 defaultopacity
+    --
+    
+    --  CLICK EVENT
+    addSelectClick
+    addSingleClickEvent
+    addDiv descId "div0" "Klicke in die Karte um Koordinaten zu erhalten."
+    addBreakline descId
+    --
+    
+    --  ADD INPUT POINT
+    ----  create an input form to be able to type a coordinate to insert a pointfeature
+    addForm descId formId
+    addInput "Mercator Hochwert: " formId hochinputId "1819207"
+    addInput "Mercator Rechtswert: " formId rechtsinputId "6141206"
+    addInput "Deckkraft: " formId opacityinputId "90"
+    addInput "Id: " formId idinputId "1000"
+    ----  add the button to insert the pointfeature
+    addButton "Symbol einsetzen" descId $ addPointFromLabels hochinputId rechtsinputId opacityinputId idinputId mypointstyle 
+    addBreakline descId
+    --
+    
+    --  CHANGE BASELAYER
+    ----  change your baselayer at Index 0
+    addBreakline descId
+    addButton "Wechsel Basiskarte Satellit" descId $ changeBaseLayer Sat
+    addButton "Wechsel Basiskarte OpenStreetMap" descId $ changeBaseLayer OSM
+    addBreakline descId
+    ---
+    
+    --  BUTTONS WITH DIFFERENT METHODS
+    ----  add buttons to navigate to specific location and zoomlevel
+    addBreakline descId
+    addButton "Wien"   descId $ setCenter vienna
+    addButton "Rom"    descId $ setCenterZoom rome zoomlevel
+    addButton "Madrid" descId $ setCenterZoom madrid zoomlevel
+    addBreakline descId
+    --  add button for other tools
+    addButton "Zoom +" descId $ zoomIn  1
+    addButton "Zoom -" descId $ zoomOut 1
+    addBreakline descId
+    ---
+        
+    --  BINDINGS
+    ----  create some checkbox for binding
+    addCheckbox visiblecheckboxU1 "table1" "U1 "
+    addCheckbox visiblecheckboxU2 "table2" "U2 "
+    addCheckbox visiblecheckboxU3 "table3" "U3 "
+    addCheckbox visiblecheckboxU4 "table4" "U4 "
+    ----  bind the html-element checkbox with a layer
+    addOlDomInput visiblecheckboxU1 "checked" "visible" $ getLayerByIndex 3
+    addOlDomInput visiblecheckboxU2 "checked" "visible" $ getLayerByIndex 4
+    addOlDomInput visiblecheckboxU3 "checked" "visible" $ getLayerByIndex 5
+    addOlDomInput visiblecheckboxU4 "checked" "visible" $ getLayerByIndex 6
+    --
+    
+    --  EVENT LABELS
+    ----  add some labels to display map events
+    addLabel zoomlabel     "<div>" "zl1"
+    addLabel wgslabel      "<div>" "wl1"
+    addLabel mercatorlabel "<div>" "ml1"
+    ----  at moveend of the map add the center and zoomlevel of the map to the label
+    addMapWindowEvent "moveend" $ setEventToHtml zoomlabel getZoom
+    addMapWindowEvent "moveend" $ setEventToHtml wgslabel $ getCenter wgs84proj 5
+    addMapWindowEvent "moveend" $ setEventToHtml mercatorlabel $ getCenter mercatorproj 1
+    --
diff --git a/web/Tutorial/Traffic.hs b/web/Tutorial/Traffic.hs
new file mode 100644
--- /dev/null
+++ b/web/Tutorial/Traffic.hs
@@ -0,0 +1,186 @@
+module Tutorial.Traffic where
+
+import           OpenLayers.Types
+
+uStationSize = 3
+uLineSize = 2
+
+u1Color = "red"
+u1StationStyle = GeoPointStyle uStationSize u1Color u1Color 1
+u1LineStyle = GeoLineStyle u1Color uLineSize
+u2Color = "#8904B1"
+u2StationStyle = GeoPointStyle uStationSize u2Color u2Color 1
+u2LineStyle = GeoLineStyle u2Color uLineSize
+u3Color = "orange"
+u3StationStyle = GeoPointStyle uStationSize u3Color u3Color 1
+u3LineStyle = GeoLineStyle u3Color uLineSize
+u4Color = "green"
+u4StationStyle = GeoPointStyle uStationSize u4Color u4Color 1
+u4LineStyle = GeoLineStyle u4Color uLineSize
+
+u4_01 = Coordinate 16.26139 48.19750 wgs84proj
+u4_02 = Coordinate 16.27528 48.19250 wgs84proj
+u4_03 = Coordinate 16.28639 48.19111 wgs84proj
+u4_04 = Coordinate 16.29473 48.18972 wgs84proj
+u4_05 = Coordinate 16.30389 48.18778 wgs84proj
+u4_06 = Coordinate 16.31890 48.18555 wgs84proj
+u4_07 = Coordinate 16.32834 48.18361 wgs84proj
+u4_08 = Coordinate 16.33472 48.18472 wgs84proj
+u4_09 = Coordinate 16.34250 48.18834 wgs84proj
+u4_10 = Coordinate 16.35445 48.19278 wgs84proj
+u4_11 = Coordinate 16.35806 48.19667 wgs84proj
+u4_12 = Coordinate 16.36889 48.20015 wgs84proj
+u4_13 = Coordinate 16.37889 48.20278 wgs84proj
+u4_14 = Coordinate 16.38500 48.20612 wgs84proj
+u4_15 = Coordinate 16.37750 48.21150 wgs84proj
+u4_16 = Coordinate 16.37195 48.21611 wgs84proj
+u4_17 = Coordinate 16.36751 48.22194 wgs84proj
+u4_18 = Coordinate 16.36361 48.22778 wgs84proj
+u4_19 = Coordinate 16.35806 48.23472 wgs84proj
+u4_20 = Coordinate 16.36612 48.24888 wgs84proj
+
+u4 = [
+    GeoPoint u4_01 40001 u4StationStyle,
+    GeoPoint u4_02 40002 u4StationStyle,
+    GeoPoint u4_03 40003 u4StationStyle,
+    GeoPoint u4_04 40004 u4StationStyle,
+    GeoPoint u4_05 40005 u4StationStyle,
+    GeoPoint u4_06 40006 u4StationStyle,
+    GeoPoint u4_07 40007 u4StationStyle,
+    GeoPoint u4_08 40008 u4StationStyle,
+    GeoPoint u4_09 40009 u4StationStyle,
+    GeoPoint u4_10 40010 u4StationStyle,
+    GeoPoint u4_11 40011 u4StationStyle,
+    GeoPoint u4_12 40012 u4StationStyle,
+    GeoPoint u4_13 40013 u4StationStyle,
+    GeoPoint u4_14 40014 u4StationStyle,
+    GeoPoint u4_15 40015 u4StationStyle,
+    GeoPoint u4_16 40016 u4StationStyle,
+    GeoPoint u4_17 40017 u4StationStyle,
+    GeoPoint u4_18 40018 u4StationStyle,
+    GeoPoint u4_19 40019 u4StationStyle,
+    GeoPoint u4_20 40020 u4StationStyle,
+    GeoLine [u4_01, u4_02, u4_03, u4_04, u4_05, u4_06, u4_07, u4_08, u4_09, u4_10,
+             u4_11, u4_12, u4_13, u4_14, u4_15, u4_16, u4_17, u4_18, u4_19, u4_20] 41001 u4LineStyle
+    ]
+
+u3_01 = Coordinate 16.42024 48.17001 wgs84proj
+u3_02 = Coordinate 16.41389 48.17611 wgs84proj
+u3_03 = Coordinate 16.41139 48.17944 wgs84proj
+u3_04 = Coordinate 16.41722 48.18528 wgs84proj
+u3_05 = Coordinate 16.41500 48.19084 wgs84proj
+u3_06 = Coordinate 16.40667 48.19445 wgs84proj
+u3_07 = Coordinate 16.39972 48.19750 wgs84proj
+u3_08 = Coordinate 16.39223 48.20222 wgs84proj
+u3_09 = Coordinate 16.38500 48.20639 wgs84proj
+u3_10 = Coordinate 16.37917 48.20750 wgs84proj
+u3_11 = Coordinate 16.37222 48.20833 wgs84proj
+u3_12 = Coordinate 16.36500 48.20944 wgs84proj
+u3_13 = Coordinate 16.35834 48.20501 wgs84proj
+u3_14 = Coordinate 16.35222 48.19917 wgs84proj
+u3_15 = Coordinate 16.34611 48.19722 wgs84proj
+u3_16 = Coordinate 16.33861 48.19695 wgs84proj
+u3_17 = Coordinate 16.32861 48.19778 wgs84proj
+u3_18 = Coordinate 16.31972 48.19778 wgs84proj
+u3_19 = Coordinate 16.31167 48.19972 wgs84proj
+u3_20 = Coordinate 16.30890 48.20444 wgs84proj
+u3_21 = Coordinate 16.31111 48.21195 wgs84proj
+
+u3 = [
+    GeoPoint u3_01 30001 u3StationStyle,
+    GeoPoint u3_02 30002 u3StationStyle,
+    GeoPoint u3_03 30003 u3StationStyle,
+    GeoPoint u3_04 30004 u3StationStyle,
+    GeoPoint u3_05 30005 u3StationStyle,
+    GeoPoint u3_06 30006 u3StationStyle,
+    GeoPoint u3_07 30007 u3StationStyle,
+    GeoPoint u3_08 30008 u3StationStyle,
+    GeoPoint u3_09 30009 u3StationStyle,
+    GeoPoint u3_10 30010 u3StationStyle,
+    GeoPoint u3_11 30011 u3StationStyle,
+    GeoPoint u3_12 30012 u3StationStyle,
+    GeoPoint u3_13 30013 u3StationStyle,
+    GeoPoint u3_14 30014 u3StationStyle,
+    GeoPoint u3_15 30015 u3StationStyle,
+    GeoPoint u3_16 30016 u3StationStyle,
+    GeoPoint u3_17 30017 u3StationStyle,
+    GeoPoint u3_18 30018 u3StationStyle,
+    GeoPoint u3_19 30019 u3StationStyle,
+    GeoPoint u3_20 30020 u3StationStyle,
+    GeoPoint u3_21 30021 u3StationStyle,
+    GeoLine [u3_01, u3_02, u3_03, u3_04, u3_05, u3_06, u3_07, u3_08, u3_09, u3_10,
+             u3_11, u3_12, u3_13, u3_14, u3_15, u3_16, u3_17, u3_18, u3_19, u3_20, u3_21] 31001 u3LineStyle
+    ]
+
+u2_01 = Coordinate 16.36910 48.20028 wgs84proj
+u2_02 = Coordinate 16.36139 48.20251 wgs84proj
+u2_03 = Coordinate 16.35833 48.20556 wgs84proj
+u2_04 = Coordinate 16.35528 48.21056 wgs84proj
+u2_05 = Coordinate 16.36305 48.21528 wgs84proj
+u2_06 = Coordinate 16.37195 48.21639 wgs84proj
+u2_07 = Coordinate 16.38074 48.21908 wgs84proj
+u2_08 = Coordinate 16.39133 48.21875 wgs84proj
+u2_09 = Coordinate 16.40640 48.21770 wgs84proj
+u2_10 = Coordinate 16.41376 48.21466 wgs84proj
+u2_11 = Coordinate 16.42095 48.21030 wgs84proj
+
+u2 = [
+    GeoPoint u2_01 20001 u2StationStyle,
+    GeoPoint u2_02 20002 u2StationStyle,
+    GeoPoint u2_03 20003 u2StationStyle,
+    GeoPoint u2_04 20004 u2StationStyle,
+    GeoPoint u2_05 20005 u2StationStyle,
+    GeoPoint u2_06 20006 u2StationStyle,
+    GeoPoint u2_07 20007 u2StationStyle,
+    GeoPoint u2_08 20008 u2StationStyle,
+    GeoPoint u2_09 20009 u2StationStyle,
+    GeoPoint u2_10 20010 u2StationStyle,
+    GeoPoint u2_11 20011 u2StationStyle,
+    GeoLine [u2_01, u2_02, u2_03, u2_04, u2_05, u2_06, u2_07, u2_08, u2_09, u2_10,
+             u2_11] 21001 u2LineStyle
+    ]
+
+
+u1_01 = Coordinate 16.37778 48.17500 wgs84proj
+u1_02 = Coordinate 16.37612 48.17945 wgs84proj
+u1_03 = Coordinate 16.37278 48.18751 wgs84proj
+u1_04 = Coordinate 16.37056 48.19389 wgs84proj
+u1_05 = Coordinate 16.36889 48.20028 wgs84proj
+u1_06 = Coordinate 16.37194 48.20836 wgs84proj
+u1_07 = Coordinate 16.37750 48.21167 wgs84proj
+u1_08 = Coordinate 16.38583 48.21556 wgs84proj
+u1_09 = Coordinate 16.39333 48.21944 wgs84proj
+u1_10 = Coordinate 16.40139 48.22390 wgs84proj
+u1_11 = Coordinate 16.41055 48.22889 wgs84proj
+u1_13 = Coordinate 16.41611 48.23305 wgs84proj
+u1_14 = Coordinate 16.42436 48.23811 wgs84proj
+u1_15 = Coordinate 16.43390 48.24362 wgs84proj
+u1_16 = Coordinate 16.44333 48.25041 wgs84proj
+u1_17 = Coordinate 16.44922 48.25702 wgs84proj
+u1_18 = Coordinate 16.45158 48.26277 wgs84proj
+u1_19 = Coordinate 16.44773 48.27164 wgs84proj
+u1_20 = Coordinate 16.45164 48.27719 wgs84proj
+
+u1 = [
+    GeoPoint u1_01 10001 u1StationStyle,
+    GeoPoint u1_02 10002 u1StationStyle,
+    GeoPoint u1_03 10003 u1StationStyle,
+    GeoPoint u1_04 10004 u1StationStyle,
+    GeoPoint u1_05 10005 u1StationStyle,
+    GeoPoint u1_06 10006 u1StationStyle,
+    GeoPoint u1_07 10007 u1StationStyle,
+    GeoPoint u1_08 10008 u1StationStyle,
+    GeoPoint u1_09 10009 u1StationStyle,
+    GeoPoint u1_10 10010 u1StationStyle,
+    GeoPoint u1_11 10011 u1StationStyle,
+    GeoPoint u1_13 10013 u1StationStyle,
+    GeoPoint u1_14 10014 u1StationStyle,
+    GeoPoint u1_15 10015 u1StationStyle,
+    GeoPoint u1_16 10016 u1StationStyle,
+    GeoPoint u1_17 10017 u1StationStyle,
+    GeoPoint u1_18 10018 u1StationStyle,
+    GeoPoint u1_19 10019 u1StationStyle,
+    GeoPoint u1_20 10020 u1StationStyle,
+    GeoLine [u1_01, u1_02, u1_03, u1_04, u1_05, u1_06, u1_07, u1_08, u1_09, u1_10,
+             u1_11, u1_13, u1_14, u1_15, u1_16, u1_17, u1_18, u1_19, u1_20] 11001 u1LineStyle
+    ]
diff --git a/wrapper/OpenLayers.hs b/wrapper/OpenLayers.hs
new file mode 100644
--- /dev/null
+++ b/wrapper/OpenLayers.hs
@@ -0,0 +1,27 @@
+{-|
+Module      :  OpenLayers Wrapper mothership
+Description :  combine OpenLayers with Fay
+-}
+module OpenLayers where
+import           Prelude hiding (void)
+import           OpenLayers.Func (void, setDefaultView, setTarget)
+import           FFI
+import           Fay.Text
+import           OlApp (targetId, designMap)
+-- | Adds an default naked OpenLayers Map Object
+addDefaultMap :: Fay ()
+addDefaultMap = ffi "olmap = new ol.Map({renderer: 'canvas'})"
+{-|
+  Initialises an object of the OpenLayers Map as HTML object.
+  The variable name \"olc\" must be reserved for the whole website!
+-}
+defineCode :: Fay ()
+defineCode = ffi "olc = $(olmap)[0]"
+-- | Initialises an OpenLayers View and load the definitions from the OpenLayers Webapplication defined in "OlApp"
+olwrapperLoad :: Fay ()
+olwrapperLoad = void $ do
+    addDefaultMap
+    defineCode
+    setTarget targetId
+    setDefaultView
+    designMap
diff --git a/wrapper/OpenLayers/Func.hs b/wrapper/OpenLayers/Func.hs
new file mode 100644
--- /dev/null
+++ b/wrapper/OpenLayers/Func.hs
@@ -0,0 +1,246 @@
+{-|
+Module      :  OpenLayersFunc
+Description :  OpenLayers JavaScript and Haskell functions
+-}
+module OpenLayers.Func where
+--  defaut coordinates in OpenLayers 3 use EPSG:3857 aka Spherical Mercator !!!!!!!
+--  http://docs.openlayers.org/library/spherical_mercator.html
+
+--  new functions with ' at end of name   :    name'    :   do/should not return Fay Objects
+--  the "CREATE NEW FUNCTION" always return an Object and don't have an '
+--  klingt komisch, is aber so
+--  when you use a function in a function with void it gets -> Fay a
+--  Fay JQuery always uses Text, i do not want this so there is always an equivalent function with ' at the end
+--  that takes a String as parameter (defined in the OpenLayersHtmlFunc module)
+
+import           Prelude hiding (void)
+import           JQuery
+import           Fay.Text hiding (head, tail, map)
+import           OpenLayers.Types
+import           OpenLayers.Html
+import           FFI
+
+-- * NEW FUNCTION
+
+newLayerMqt :: String -> Object
+newLayerMqt = ffi "new ol.layer.Tile({source: new ol.source.MapQuest({layer: %1})})"
+
+newLayerOSM :: Object
+newLayerOSM = ffi "new ol.layer.Tile({source: new ol.source.OSM()})"
+
+newVector :: Object -> Opacity -> Fay Object
+newVector = ffi "new ol.layer.Vector({source: %1, opacity: %2.slot1*0.01})"
+
+newFeature :: GeoFeature -> Fay Object
+newFeature f = case f of 
+    GeoPoint p id s -> newFeaturePoint $ transformPoint' p
+    GeoLine pts id s -> newFeatureLine $ transformPoints' pts
+    _ -> error "newStyledFeature: the GeoFeature is not implemented yet"
+
+newLineStyle :: GeoLineStyle -> Object
+newLineStyle = ffi "[new ol.style.Style({stroke: new ol.style.Stroke({color: %1.color, width: %1.width})})]"
+
+newPointStyle :: GeoPointStyle -> Object
+newPointStyle = ffi "[new ol.style.Style({image: new ol.style.Circle({radius: %1.radius, fill: new ol.style.Fill({color:(%1.fillcolor == 'null' ? 'rgba(0,0,0,0)' : %1.fillcolor)}), stroke: %1.outcolor == 'null' ? null : new ol.style.Stroke({color: %1.outcolor, width: %1.outwidth})})})]"
+
+newFeatureLine :: [(Double, Double)] -> Fay Object
+newFeatureLine = ffi "new ol.source.GeoJSON({object:{'type':'Feature','geometry':{'type':'LineString','coordinates': %1}}})"
+
+newFeaturePoint :: (Double, Double) -> Fay Object
+newFeaturePoint = ffi "new ol.source.GeoJSON({object:{'type':'Feature','geometry':{'type':'Point','coordinates': %1}}})"
+    
+newOlInput :: JQuery -> String -> Object -> String -> Fay ()
+newOlInput = ffi "(new ol.dom.Input(%1[0])).bindTo(%2, %3, %4)"
+
+-- * ADD FUNCTION
+
+addSelectClick :: Fay ()
+addSelectClick = ffi "olc.addInteraction(new ol.interaction.Select({condition: ol.events.condition.click}))"
+
+addSingleClickEvent :: Fay ()
+addSingleClickEvent = ffi "olc.on('singleclick', function (evt) {alert('Koordinate WGS: ' + ol.proj.transform([evt.coordinate[0], evt.coordinate[1]], 'EPSG:3857', 'EPSG:4326') + '\\nKoordinate Mer: ' + evt.coordinate)})"
+
+addBaseLayer :: MapSource -> Fay ()
+addBaseLayer s = void $ do
+    removeLayers
+    addMapLayer s
+
+addId ::  Object -> Integer ->  Fay Object
+addId = ffi "(%2 < 1) ? '' : %1.getSource().getFeatures()[0].setId(%2)"
+
+addMapLayer :: MapSource -> Fay ()
+addMapLayer s
+      | s == OSM                  = addLayer newLayerOSM
+      | Prelude.any(s==)mapQuests = addLayer ( newLayerMqt $ showMapSource s)
+      | otherwise                 = error ("wrong MapSource allowed is OSM and " ++ show mapQuests)
+
+addLayer ::  Object -> Fay ()
+addLayer = ffi "olc.addLayer(%1)"
+
+addStyledFeature :: GeoFeature -> Opacity -> Fay ()
+addStyledFeature f o = do 
+    feature <- newFeature f
+    styleFeature feature f
+    addFeatureId feature f
+    vector <- newVector feature o
+    addLayer vector
+
+addStyledFeatures :: [GeoFeature] -> Opacity -> Fay ()
+addStyledFeatures  f o = do
+    features <- map' newFeature f
+    zipWithM styleFeature features f
+    zipWithM addFeatureId features f
+    vectors  <- zipWithM newVector features [ o | x <- [0..(Prelude.length features)-1]]
+    addLayer (head vectors)
+    sources <- return $ zipWith getFeatureAt ( vectors) [ 0 | x <- [0..(Prelude.length features)-1]]
+    addFeatures (head vectors) (tail sources)
+
+addFeatureId :: Object -> GeoFeature -> Fay Object
+addFeatureId = ffi "%1.getFeatures()[0].setId(%2.id)"
+
+addFeatures :: Object -> [Object] -> Fay ()
+addFeatures = ffi "%1.getSource().addFeatures(%2)"
+
+addPointFromLabels :: String -> String -> String -> String -> GeoPointStyle -> Fay ()
+addPointFromLabels xId yId oId idId s = void $ do
+    xinput <- selectId' xId
+    xcoor <- getVal xinput
+    yinput <- selectId' yId
+    ycoor <- getVal yinput
+    o <- getInputInt oId
+    i <- getInputInt idId
+    addStyledFeature (GeoPoint (Coordinate (toDouble' xcoor) (toDouble' ycoor) (Projection "EPSG:3857")) i s) (Opacity o)
+    
+addMapListener :: String -> String -> Fay ()
+addMapListener = ffi "olc.on(%1, %2)"
+
+addMapWindowEvent :: String -> Fay JQuery -> Fay ()
+addMapWindowEvent = ffi "olc.on(%1, %2)"
+
+addOlDomInput :: String -> String -> String -> Object -> Fay ()
+addOlDomInput id typehtml value method = void $ do
+    element <- selectId' id
+    newOlInput element typehtml method value
+
+-- * REMOVE FUNCTION
+removeLayers :: Fay ()
+removeLayers = void $ do
+    layers <- getLayers
+    mapM removeLayer layers
+
+removeLayer :: a -> Fay ()
+removeLayer = ffi "olc.removeLayer(%1)"
+
+-- * CHANGE FUNCTION
+zoomIn :: Integer -> Fay ()
+zoomIn = ffi "olc.getView().setZoom(olc.getView().getZoom()+%1)"
+
+zoomOut :: Integer -> Fay ()
+zoomOut = ffi "olc.getView().setZoom(olc.getView().getZoom()-%1)"
+
+styleFeature :: Object -> GeoFeature -> Fay Object
+styleFeature object feature = case feature of 
+    GeoPoint p id s  -> styleFeature' object $ newPointStyle s
+    GeoLine pts id s -> styleFeature' object $ newLineStyle  s
+    _ -> error "styleFeature: the GeoFeature is not implemented yet"
+
+styleFeature' :: Object -> Object -> Fay Object
+styleFeature' = ffi "%1.getFeatures()[0].setStyle(%2)"
+
+changeBaseLayer :: MapSource -> Fay ()
+changeBaseLayer s = void $ do
+    layers <- getLayers
+    addBaseLayer s
+    map' addLayer $ tail layers
+
+-- * SET FUNCTION
+setFeatureStyle :: Object -> Object -> Object
+setFeatureStyle = ffi "%1.setStyle(%2)"
+
+setCenter' :: (Double, Double) -> Fay ()
+setCenter' = ffi "olc.getView().setCenter(%1)"
+
+setCenter :: Coordinate -> Fay ()
+setCenter c = setCenter' $ transformPoint' c
+
+setCenterZoom :: Coordinate -> Integer -> Fay ()
+setCenterZoom c z = void $ do
+    setCenter c
+    setZoom z
+
+setZoom :: Integer -> Fay ()
+setZoom = ffi "olc.getView().setZoom(%1)"
+
+setTarget :: String -> Fay ()
+setTarget = ffi "olc.setTarget(%1)"
+
+setDefaultView :: Fay ()
+setDefaultView = ffi "olc.setView(new ol.View({center:[0,0],zoom:2}))"
+
+setEventToHtml :: String -> Fay Text -> Fay JQuery
+setEventToHtml elementId function = do 
+    value <- function
+    element <- selectId' elementId
+    setHtml value element
+
+-- * GET FUNCTION
+getCenter :: Projectionlike -> Integer -> Fay Text
+getCenter proj fixed = do 
+     c <- getCenter_
+     coordFixed (transformPointBack' proj c) fixed
+
+getZoom :: Fay Text
+getZoom = ffi "olc.getView().getZoom()"
+
+getCenter_ :: Fay (Double, Double)
+getCenter_ = ffi "olc.getView().getCenter()"
+
+getLayers :: Fay [Object]
+getLayers = ffi "olc.getLayers().getArray()"
+
+getLayerByIndex :: Integer -> Object
+getLayerByIndex = ffi "olc.getLayers().item(%1)"
+
+getLayerByIndex' :: Integer -> Fay Object
+getLayerByIndex' = ffi "olc.getLayers().item(%1)"
+
+getFeatureId :: Object -> Integer
+getFeatureId = ffi "%1.getId()"
+
+getFeatureAt :: Object -> Integer -> Object
+getFeatureAt = ffi "%1.getSource().getFeatures()[%2]"
+
+getFeatureLength :: Object -> Integer
+getFeatureLength = ffi "%1.getSource().getFeatures().length"
+
+-- * TRANSFORM FUNCTION
+transformPointBack' :: Projectionlike -> (Double, Double) -> (Double, Double)  --  Funktion wenn Variable von OpenLayers in Haskell benötigt
+transformPointBack' = ffi "ol.proj.transform(%2, 'EPSG:3857', %1.slot1)"
+
+transformPoint' :: Coordinate -> (Double, Double)  --  Funktion wenn Variable in Haskell geschrieben
+transformPoint' = ffi "ol.proj.transform([%1.x, %1.y], %1.from.slot1, 'EPSG:3857')"
+
+transformPoints' :: [Coordinate] -> [(Double, Double)]
+transformPoints' c = [transformPoint' x | x <- c]
+
+-- * OTHER FUNCTION
+coordFixed ::  (Double, Double) -> Integer -> Fay Text
+coordFixed = ffi "%1[0].toFixed(%2) + ',' + %1[1].toFixed(%2)"
+
+void :: Fay f -> Fay ()
+void f = f >> return ()
+
+lois :: Fay f -> f
+lois = ffi "%1"
+
+toDouble' :: Text -> Double
+toDouble' = ffi "%1"
+
+zipWithM3 :: (a -> b -> c -> Fay d) -> [a] -> [b] -> [c] -> Fay [d]
+zipWithM3 f xs ys is = sequence $ zipWith3 f xs ys is
+
+zipWithM :: (a -> b -> Fay c) -> [a] -> [b] -> Fay [c]
+zipWithM f xs ys = sequence $ zipWith f xs ys
+
+map' :: (a -> Fay b) -> [a] -> Fay [b]
+map' f xs = sequence (map f xs)
diff --git a/wrapper/OpenLayers/Html.hs b/wrapper/OpenLayers/Html.hs
new file mode 100644
--- /dev/null
+++ b/wrapper/OpenLayers/Html.hs
@@ -0,0 +1,116 @@
+{-|
+Module      :  OpenLayersHtmlFunc
+Description :  OpenLayers HTML and JQuery functions
+-}
+module OpenLayers.Html where
+
+import           JQuery
+import           FFI
+import           Fay.Text
+import           OpenLayers.HtmlInternal
+
+addTextToHtml :: String -> String -> String -> Fay ()
+addTextToHtml content element id = void $ do
+     c <- selectId' id
+     d <- select' element
+     setHtml' content d
+     appendTo c d
+
+addButton :: String -> String -> Fay () -> Fay ()
+addButton text id method = void $ do
+     c <- selectId' id
+     d <- select' buttonElement
+     setAttr' "value" text d
+     setAttr' "type" "submit" d
+     onClick' method d
+     appendTo c d
+
+addCheckbox :: String -> String -> String -> Fay ()
+addCheckbox id parentId label = void $ do
+    parent  <- selectId' parentId
+    div     <- select' divElement
+    setHtml' label div
+    checkbox <- select' inputCheckboxElement
+    setAttr' "id" id checkbox
+    appendTo div checkbox
+    appendTo parent div
+
+addDiv :: String -> String -> String -> Fay ()
+addDiv parentId divId label = void $ do
+    parent  <- selectId' parentId
+    div    <- select' divElement
+    setAttr' "id" divId div
+    setHtml' label div
+    appendTo parent div
+    
+addLabel :: String -> String -> String -> Fay ()
+addLabel parentId element id = void $ do
+    parent <- selectId' parentId
+    d <- select' element
+    setAttr' "id" id d
+    appendTo parent d
+
+addForm :: String -> String -> Fay JQuery
+addForm parentId formId = do
+    parent   <- selectId' parentId
+    form     <- select' $ formElement
+    setAttr' "id" formId form
+    appendTo parent form
+
+addInput :: String -> String -> String -> String -> Fay ()
+addInput label formId elementId defaultValue = void $ do
+    parent <- selectId' formId
+    div    <- select' divElement
+    setHtml' label div
+    input   <- select' inputTextElement
+    setAttr' "id"    elementId    input
+    setAttr' "value" defaultValue input
+    appendTo div input
+    appendTo parent div
+
+addBreakline :: String -> Fay ()
+addBreakline id = void $ do
+    parent <- selectId' id
+    value <- select' "<br>"
+    appendTo parent value
+
+getInputInt :: String -> Fay Integer
+getInputInt labelId = do
+    idinput <- selectId' labelId
+    idvalue <- getVal idinput
+    toInt idvalue
+
+onClick' :: Fay () -> JQuery -> Fay JQuery
+onClick' = ffi "%2['click'](%1)"
+
+select' :: String -> Fay JQuery
+select' s = select $ showString' s
+
+selectId' :: String -> Fay JQuery
+selectId' s = select $ showString' $ "#" ++ s
+
+setHtml' :: String -> JQuery -> Fay JQuery
+setHtml' content target = setHtml (showString' content) target
+
+setAttr' :: String -> String -> JQuery -> Fay JQuery
+setAttr' att val target = setAttr (showString' att) (showString' val) target
+
+setDoubleAttr' :: String -> Double -> JQuery -> Fay JQuery
+setDoubleAttr' att val target = setAttr (showString' att) (showDouble' val) target
+
+showString' :: String -> Text
+showString' = ffi "%1"
+
+showDouble' :: Double -> Text
+showDouble' = ffi "%1"
+
+toInt :: Text -> Fay Integer
+toInt = ffi "%1"
+
+toInt' :: String -> Integer
+toInt' = ffi "%1"
+
+
+
+
+
diff --git a/wrapper/OpenLayers/Internal.hs b/wrapper/OpenLayers/Internal.hs
new file mode 100644
--- /dev/null
+++ b/wrapper/OpenLayers/Internal.hs
@@ -0,0 +1,9 @@
+module OpenLayers.HtmlInternal where
+
+buttonElement = "<input>"
+divElement  = "<div>"
+formElement  = "<form>"
+inputTextElement = "<input type=text>"
+inputCheckboxElement = "<input type=checkbox>"
+aElement  = "<a>"
+pElement  = "<p>"
diff --git a/wrapper/OpenLayers/Types.hs b/wrapper/OpenLayers/Types.hs
new file mode 100644
--- /dev/null
+++ b/wrapper/OpenLayers/Types.hs
@@ -0,0 +1,87 @@
+{-|
+Module      :  OpenLayersTypes
+Description :    new types, new data, global constants and mapsource for olwrapper
+-}
+module OpenLayers.Types where
+
+-- * Constants
+-- | The 'Projectionlike' for WGS84
+wgs84proj = Projection "EPSG:4326"
+-- | The 'Projectionlike' for Mercator
+mercatorproj = Projection "EPSG:3857"
+
+-- * Types
+-- ** type
+-- | Layers with IDs are using 'GeoId'
+type GeoId = Integer
+-- ** data
+-- | OpenLayers Projection constructed f.e. with \'Projection \"EPSG:4326\"\'
+data Projectionlike = Projection String
+-- | constructor for a coordinate with x,y and projection
+data Coordinate = Coordinate { 
+        -- | first coordinate
+        x :: Double, 
+        -- | second coordinate
+        y :: Double, 
+        -- | projection
+        from :: Projectionlike 
+    }
+-- | Layer Opacity from min=0 (not visible) to max=100
+data Opacity = Opacity Integer
+data GeoFeature 
+    -- | A GeoLine is a styled line feature with an id
+    = GeoLine { 
+        -- | linepoints as a  list of 'Coordinate'
+        pts :: [Coordinate], 
+        -- | id for the feature with 'GeoId'
+        id :: GeoId, 
+        -- | linestyle with 'GeoLineStyle'
+        lstyle :: GeoLineStyle
+    } 
+    -- | A GeoPoint is a styled point feature with an id
+    | GeoPoint {
+        -- | position with a 'Coordinate'
+        pt ::  Coordinate, 
+        id :: GeoId, 
+        -- | pointstyle with 'GeoPointStyle'
+        pstyle :: GeoPointStyle
+    }
+-- | defining a style for a 'GeoLine' feature
+data GeoLineStyle = GeoLineStyle { 
+        -- | line color, can be a name (red) or code (#8904B1)
+        color :: String, 
+        -- | width of the line
+        width :: Integer 
+    }
+-- | defining a style for a circled 'GeoPoint' feature
+data GeoPointStyle = GeoPointStyle { 
+        -- | radius of the circle
+        radius :: Integer, 
+        -- | fill color of the circle, can be a name (red) or code (#8904B1)
+        fillcolor :: String, 
+        -- | line color of the border of the circle, name (red) or code (#8904B1)
+        outcolor :: String, 
+        -- | width of the border of the circle, if 0 no outcolor needed
+        outwidth :: Integer 
+    }
+-- | list of possible mapsources
+data MapSource 
+    = Sat  -- ^ MapQuest's satellite
+    | Hyb  -- ^ MapQuest's hybrid
+    | Osm  -- ^ MapQuest's OpenStreetMap
+    | OSM  -- ^ OpenStreetMap
+    deriving (Eq)
+    
+-- * List
+-- | puts the sources from MapQuest in a list
+mapQuests = [Osm, Sat, Hyb]
+
+-- * Functions
+-- | transform 'MapSource' to 'String' and handle wrong input
+showMapSource :: MapSource -> String
+showMapSource ms
+    | ms == Sat = "sat"
+    | ms == Hyb = "hyb"
+    | ms == Osm = "osm"
+    | ms == OSM = "OSM"
+    | otherwise = "showMapSource not defined, check Layer"
